Свойство text-stroke
Описание
Одновременно устанавливает цвет и толщину контура вокруг букв и символов текста.
Синтаксис
text-stroke: text-stroke-width || text-stroke-color;
Пример
<!DOCTYPE html>
<html lang='ru'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>Document</title>
</head>
<body>
<style>
#test {
background-color: black;
padding: 15px;
color: white;
}
#hh {
font: bold Arial;
-webkit-text-stroke: 1px turquoise;
color: transparent;
animation: neon 2s linear infinite alternate-reverse;
}
@keyframes neon {
from {
-webkit-text-stroke: 1px turquoise;
}
to {
-webkit-text-stroke: 1px coral;
}
}
</style>
<div id='test'>
<h2 id='hh'>W E B I K</h2>
</div>
</body>
</html>
W E B I K
Читайте также
Стиль для элемента, получающего фокус
Псевдокласс :focus определяет стиль для элемента, получающего фокус. Например, им может быть текс...
Селекторы атрибутов со значениями в неопределенном месте
Возможны варианты, когда стиль следует применить к тегу с определённым атрибутом, когда частью ег...
Свойство animation-timing-function
Устанавливает функцию расчета значений между началом и концом анимации.
Свойство height
Утанавливает высоту элементов. Она не включает толщину границ вокруг элемента, значение отступов ...
Свойство list-style
Универсальное свойство. Одновременно задает стиль маркера, его положение, а также изображение, ко...