Неоновая тень текста (HTML код)
<div class="center">
<p>Good Night, Enemies.</p>
</div>
Неоновая тень текста (CSS код)
@import url("https://fonts.googleapis.com/css2?family=Berkshire+Swash&display=swap");
body {
background-color: #111111;
background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23383838' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}
body,
html {
display: grid;
height: 100%;
margin: 0;
padding: 0;
font-family: "Berkshire Swash", cursive;
}
.center {
margin: auto;
}
p {
font-size: calc(45px + 5vw);
animation: 1s slidein infinite alternate;
color: white;
text-align: center;
padding: 0.5rem;
}
@keyframes slidein {
from {
text-shadow: 1px -3px 5px rgba(0, 255, 255, 1), 1px 3px 5px rgba(255, 0, 0, 1),
10px -10px 20px rgba(255, 0, 0, 1);
}
to {
text-shadow: -3px 0px 5px rgba(0, 255, 255, 1), 3px 0px 5px rgba(255, 0, 0, 1),
-5px 5px 20px rgba(0, 255, 255, 1);
}
}
Неоновая тень текста (Результат кода)
Comments