
只用css实现404外面的边框旋转
html代码
<div class="warning">ERROR 404</div>
css代码
body {
margin: 0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: rgb(20%, 20%, 20%);
}
.warning {
color: whitesmoke;
font-size: 80px;
font-family: sans-serif;
font-weight: bold;
position: relative;
padding: 0.6em 0.4em;
}
.warning::before,
.warning::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-width: 0.2em;
box-sizing: border-box;
color: orangered;
animation: rotating 10s infinite;
}
.warning::before {
border-style: solid solid none none;
z-index: -1;
}
.warning::after {
border-style: none none solid solid;
box-shadow: 0.3em 0.3em 0.3em rgba(20%, 20%, 20%, 0.8);
}
@keyframes rotating {
to {
transform: rotate(360deg);
}
}
© 版权声明
本站网络名称:
蚩梦博客
本站永久网址:
https://chimengblog.com/
网站侵权说明:
本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长QQ45096653删除处理。
1 本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
2 本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
3 本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
1 本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
2 本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
3 本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
THE END
暂无评论内容