Skip to content

Commit e27d89d

Browse files
committed
Multicolor border using conic gradient
1 parent 051bd57 commit e27d89d

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Multicolor border using iconic gradient</title>
7+
<link rel="stylesheet" href="style.css" />
8+
<link rel="preconnect" href="https://fonts.googleapis.com" />
9+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10+
<link
11+
href="https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap"
12+
rel="stylesheet"
13+
/>
14+
</head>
15+
<body>
16+
<p>
17+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Rem, odit.
18+
Blanditiis quae ab odio impedit necessitatibus tempore accusamus ea
19+
veritatis beatae, sint, iste deserunt rerum reprehenderit similique autem
20+
quam consequuntur officiis dolore placeat fuga nulla mollitia non. Aut,
21+
sapiente animi.
22+
</p>
23+
</body>
24+
</html>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
:root,
2+
::before,
3+
::after {
4+
box-sizing: border-box;
5+
margin: 0;
6+
padding: 0;
7+
}
8+
9+
body {
10+
font-family: "Lora", serif;
11+
display: flex;
12+
justify-content: center;
13+
align-items: center;
14+
height: 100vh;
15+
background: ghostwhite;
16+
}
17+
18+
p {
19+
width: 300px;
20+
background-color: black;
21+
color: white;
22+
padding: 15px 25px;
23+
border-radius: 8px;
24+
position: relative;
25+
}
26+
27+
p::after {
28+
content: "";
29+
position: absolute;
30+
inset: -5px;
31+
width: calc(100% + 10px);
32+
height: calc(100% + 10px);
33+
z-index: -1;
34+
padding: 5px;
35+
border-radius: 8px;
36+
background: conic-gradient(
37+
from 0deg,
38+
#ff5f6d,
39+
#ffc371,
40+
#ffd700,
41+
#32cd32,
42+
#00fa9a,
43+
#1e90ff,
44+
#9370db,
45+
#fff56d
46+
);
47+
}

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
This repository is a collection of CSS projects created as part of a daily challenge to improve CSS skills. Feel free to explore, learn, and contribute!
66

7+
### Projects
8+
9+
| No. | Project | Live Demo |
10+
| :-: | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
11+
| 01 | [Multicolor border using conic gradient](https://github.com/hritik5102/CSS-Daily-Challenge/) | [Live Demo](https://codepen.io/HritikDj/pen/XWLNjPB) |
12+
713
### Project Structure
814

915
1. Each CSS project should be in its own folder.

0 commit comments

Comments
 (0)