当前位置:首页 > 网站应用 > 正文内容

css3设计伪元素实现太极阴阳图并旋转

cjw1232年前 (2023-11-01)网站应用4600
<style>
body{margin:0;}
.wrap{
position:relative;
width:200px;
height:100px;
background-color:#fff;
margin:50px auto;
border-width:1px 1px 100px 1px;
border-style: solid;
border-radius: 50%;
animation:rote 2s linear infinite;/*动画名,执行时间*/
}
.wrap:before,
.wrap:after{
content:'';
position: absolute;
top: 50%;
width:20px;
height:20px;
border-radius:50%;
}
.wrap:before{
    left: 0;
    background-color: #fff;
    border:40px solid #000;
}
.wrap:after{
    right: 0;
    background-color: #000;
    border:40px solid #fff;
}
@keyframes rote{
from{
transform: rotate(0deg);
}
to{
transform: rotate(360deg);
}
}
.wrap:hover{
animation-play-state: paused;
}
</style>
</head>
<body>
<div class="wrap"></div>
</body>


扫描二维码推送至手机访问。

版权声明:本文由追求完美发布,如需转载请注明出处。

本文链接:https://www.cjw123.com/blog/?id=30

分享给朋友:

相关文章

html meta标签屏蔽搜索引擎的用法

html页面中的 meta 标签可以用来识别搜索引擎的蜘蛛类型,可以规定meta标签所在的html页面是否被蜘蛛抓取,下面是这个meta标签的用法,大家可以借鉴一下。搜索引擎的 meta 标签的解析下面是meta标签对搜索引擎的解析<meta name='robot...

糖果风格的动画按钮

这是一款糖果风格的动画按钮,共16个,每个按钮都有不同的渐变色和动画形式。点击代码下面的运行可以查看效果<!DOCTYPE html>    <html lang="zh-CN"> &n...

CSS3用hover实现百叶窗动画

<style> ul,li{margin:0;padding:0;} ul{ display:flex; margin:0 auto; width:960px; height:500px; outline:1px solid black;...

zblogphp二级目录建站,伪静态规则怎么写

如果你的 Z-BlogPHP 站点安装在二级目录中,需要使用伪静态技术来优化站点的 URL,并提升搜索引擎蜘蛛的抓取效率。下面是一个 nginx 的伪静态规则示例:# 子目录规则要排在前边; location /sub/ {    &n...

摇摆的灯光

点击运行看演示效果!<!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">...

霓虹灯文字代码

<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title&g...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。