Пишем код HTML:
Пишем наш стиль:
Получаем следующий результат:
HTML:
<svg viewport="0 0 400 400" width="400" height="400">
<filter id="fire">
<feImage xlink:href="https://images.unsplash.com/photo-1615782380013-1d5a94f3e3f9?crop=entropy&cs=srgb&fm=jpg&ixid=M3wzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE3MTY3OTUwNzB8&ixlib=rb-4.0.3&q=85" result="IMAGE"></feImage>
<feTurbulence id="turbulence" in="IMAGE" baseFrequency="0.01" numOctaves="2" result="NOISE"></feTurbulence>
<feDisplacementMap in="IMAGE" in2="NOISE" scale="30" result="DISPLACE"></feDisplacementMap>
<animate xlink:href="#turbulence" attributeName="baseFrequency" dur="40s" keyTimes="0;0.5;1" values="0.01 0.02;0.02 0.04;0.01 0.02" repeatCount="indefinite"></animate>
<feComposite operator="in" in="DISPLACE" in2="SourceGraphic"></feComposite>
</filter>
<filter id="smoke">
<feTurbulence id="smoke-turbulence" type="fractalNoise" baseFrequency="0.01" numOctaves="3"></feTurbulence>
<animate xlink:href="#smoke-turbulence" attributeName="baseFrequency" dur="40s" keyTimes="0;0.5;1" values="0.01 0.02;0.02 0.04;0.01 0.02" repeatCount="indefinite"></animate>
</feTurbulence>
<feDisplacementMap in="SourceGraphic" scale="30"></feDisplacementMap>
</filter>
</svg>
<div class="wrapper">
<p class="smoke" data-text="hot">web-zones.ru</p>
<p class="fire">web-zones.ru</p>
</div>
CSS:
:root {
--main-bg: #1d1e22;
}
html {
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: inherit;
margin: 0;
padding: 0;
}
body {
position: relative;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
gap: 2rem;
padding: 1rem;
min-height: 100vh;
font-weight: 700;
font-family: "Monoton", sans-serif;
color: #ffffff;
background-color: var(--main-bg);
}
svg {
position: absolute;
}
.wrapper {
position: relative;
width: 100%;
text-align: center;
& p {
font-size: 10rem;
}
}
.fire {
filter: url("#fire");
}
.smoke {
position: absolute;
width: 100%;
filter: url(#smoke) blur(5px) opacity(.8);
}
.smoke::before {
content: attr(data-text);
position: absolute;
filter: url(#smoke) drop-shadow(0 0 40px #ffffff) blur(40px);
}
@media (max-width: 768px) {
html {
font-size: 10px;
}
}