Интересная штука не так давно попалась: светящийся эффект в иконах на чистом css. Не люблю таким делиться, но тут — не удержался.
Сам код выглядит так (html-файл, в котором все выводится):
/* Error on css_demo/style.css : Something went wrong: Предоставлен неверный URL. */
А вот — css-код, благодаря которому и происходит магия:
* {
margin: 0;
padding: 0;
}
body {
height: 100vh;
width: 100vw;
background: #18191f;
}
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
width: 100vw;
}
#apple,
#twitter,
#github,
#facebook {
font-size: 8em;
background-color: #18191f;
color: #fff;
box-shadow: 2px 2px 2px #00000080, 10px 1px 12px #00000080,
2px 2px 10px #00000080, 2px 2px 3px #00000080, inset 2px 2px 10px #00000080,
inset 2px 2px 10px #00000080, inset 2px 2px 10px #00000080,
inset 2px 2px 10px #00000080;
border-radius: 29px;
padding: 11px 19px;
margin: 0 40px;
animation: animate 3s linear infinite;
text-shadow: 0 0 50px #0072ff, 0 0 100px #0072ff, 0 0 150px #0072ff,
0 0 200px #0072ff;
}
#twitter {
animation-delay: 0.3s;
}
#facebook {
animation-delay: 0.7s;
}
#github {
animation-delay: 0.1s;
}
@keyframes animate {
from {
filter: hue-rotate(0deg);
}
to {
filter: hue-rotate(360deg);
}
}
Выглядит это следующим образом:
И да — по какой-то причине плагин на сайте, отвечающий за вставку кода — подглючивает, потому ссылка на страницу с примером тут.
Надеюсь, вам нравится так же, как и мне (психоделика в стиле 80-хх, но красиво 🙂 ).
Support the Blog!
Running a blog takes a lot of effort, time, and passion. Your donations help improve the content, inspire new ideas, and keep the project going.
If you’ve enjoyed the blog’s materials, any support would mean the world to me. Thank you for being here! ❤️