
效果展示
thanks
html代码
<body>
<figure class="neon">
<p class="text" data-text="thanks">thanks</p>
<div class="gradient"></div>
<div class="spotlight"></div>
</figure>
</body>
css代码
body {
margin: 0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: black;
}
.neon {
position: relative;
overflow: hidden;
user-select: none;
}
.text {
color: white;
font-size: 150px;
font-weight: bold;
font-family: sans-serif;
text-transform: uppercase;
margin: 0;
filter: brightness(2);
background-color: black;
}
.text::before {
content: attr(data-text);
position: absolute;
filter: blur(3px);
mix-blend-mode: difference;
}
.gradient {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(45deg, red, gold, lightgreen, gold, red);
mix-blend-mode: multiply;
}
.spotlight {
position: absolute;
top: -200%;
left: -100%;
right: -100%;
bottom: -200%;
background: radial-gradient(circle, white, black 25%)
center / 5% 5%;
transform: rotate(45deg);
mix-blend-mode: color-dodge;
animation: light 10s linear infinite;
}
@keyframes light {
to {
transform: translate(25%, 25%);
}
}
© 版权声明
本站网络名称:
蚩梦博客
本站永久网址:
https://chimengblog.com/
网站侵权说明:
本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长QQ45096653删除处理。
1 本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
2 本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
3 本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
1 本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
2 本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
3 本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
THE END
- 最新
- 最热
只看作者