Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
HassanEssam0110 committed Nov 17, 2023
1 parent 1ddc3f9 commit be72a5b
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
96 changes: 96 additions & 0 deletions Gradient tricks/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
:root {
--color-main: #d2de32;
--color-sec: #61a3ba;
}
*,
*::after,
*::before {
padding: 0;
margin: 0;
box-sizing: border-box;
}

body {
min-height: 100vh;
font-family: "Helvetica Neue", Helvetica;
}

.d-flex {
display: flex;
justify-content: center;
align-items: center;
}
.flex-column {
flex-direction: column;
}
.container {
width: 80%;
height: auto;
margin: auto;
padding: 20px;
gap: 20px;
}

.container > div {
width: 250px;
height: 250px;
/* border: 1px solid #333; */
}

.bg-gragient {
background-image: repeating-conic-gradient(
var(--color-main) 0% 10%,
var(--color-sec) 10% 20%
);
border-radius: 50%;
}
.text-gragient {
font-size: 80px;
background-image: repeating-conic-gradient(
var(--color-main) 0% 5%,
var(--color-sec) 5% 10%
);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
/* color: transparent; */
}

div .border-gragient {
width: fit-content;
height: fit-content;
padding: 3px;
position: relative;
overflow: hidden;
}

.border-gragient::after {
content: "";
position: absolute;
width: 100%;
height: 100%;
background-image: repeating-conic-gradient(
var(--color-sec) 0% 10%,
var(--color-main) 10% 20%
);
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
animation: rotate-border 2s infinite linear;
}
.border-gragient .content {
background-color: #fff;
color: var(--color-sec);
width: 100%;
height: 100%;
font-size: 50px;
padding: 20px;
}

@keyframes rotate-border {
100% {
transform: rotate(360deg);
}
}
22 changes: 22 additions & 0 deletions Gradient tricks/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
<title>tricks</title>
</head>

<body class="d-flex">

<div class="container d-flex flex-column">
<div class="bg-gragient"></div>
<div class="text-gragient d-flex">Hello world</div>
<div class="border-gragient">
<div class="content d-flex">Hello world</div>
</div>
</div>
</body>

</html>

0 comments on commit be72a5b

Please sign in to comment.