<div class="border">
<div class="container center background">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/React-icon.svg/2300px-React-icon.svg.png" alt="react logo" width="200px" />
<div class="text center">
<h1>REACT IS COOL</h1>
<p>Learn React right now!</p>
</div>
<span class="button">Get Started</span>
</div>
</div>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--text-color: rgb(209 213 219);
}
.background {
background: linear-gradient(to bottom right, #000, #0f172a);
}
.center {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
body {
min-height: 100dvh;
color: var(--text-color);
font-family: monospace;
background: #000;
display: flex;
flex-direction: columm;
align-items: center;
justify-content: center;
background: linear-gradient(to bottom right, #000, #0f172a);
}
/* for animated gradient border */
@property --angle {
syntax: "<angle>";
inherits: false;
initial-value: 0deg;
}
.border {
padding: 0.3rem;
border-radius: 1rem;
background: linear-gradient(var(--angle), #ff0033, #00b1e2);
animation: rotate 5s linear infinite;
}
@keyframes rotate {
from {
--angle: 0deg;
}
to {
--angle: 360deg;
}
}
/* for container */
.container {
gap: 2rem;
padding: 2rem 3rem;
border-radius: 1rem;
}
/* for text */
.text {
gap: 0.5rem;
text-align: center;
}
.text h1 {
font-size: 2rem;
}
.text p {
font-size: 1rem;
}
.button {
color: var(--text-color);
text-decoration: none;
padding: 1rem 2rem;
border: solid 2px #00b1e2;
border-radius: 2rem;
font-size: 1rem;
transition: 200ms;
}
.button:hover {
cursor: pointer;
box-shadow: 0 0 20px #00b1e2;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.