纯CSS3 太极效果

<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
  <title>CSS3</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <!-- <link rel="stylesheet" href="./taiji.css"> -->
  <style>
html{
width:100%;
height:100%;
-webkit-text-size-adjust:none;
-moz-text-size-adjust:none;
-ms-text-size-adjust:none;
-o-text-size-adjust:none;
text-size-adjust:none;
}


body{
margin:0;
padding:0;
width: 100%;
height:100%;
    background: -webkit-linear-gradient(black, white) no-repeat; 
    background: -o-linear-gradient(black, white) no-repeat;
    background: -moz-linear-gradient(black, white) no-repeat;
    background: linear-gradient(black, white) no-repeat;
color:#000;
font-size: 1.53em;
font-family: "SimSun";
}
ul{
list-style: none;
margin: 0;
padding:0;
}


a:link,a:hover,a:visited,a:focus{
text-decoration: none;
outline: none;
}
*,*:after,*:before{
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
-ms-box-sizing:border-box;
-o-box-sizing:border-box;
}
*:after,*:before{
display: block;
content:"";
}
*:after{
clear: both;
}
/* taiji */
.box-taiji{
position: relative;
width:400px;
height:400px;
margin:100px auto;
border-radius: 50%;
background-color: #ccc;
-webkit-animation:huan 2.5s infinite linear;
animation:huan 2.5s infinite linear;

}
.box-taiji .b{
position:absolute;
left:0;
top:0;
z-index: 9999;
width:200px;
height:200px;
border-radius: 50%;
background-color: #fff;
-webkit-transform:translateX(50%);
transform:translateX(50%);
/*transform:translateY(-25%);*/
}
.box-taiji .b p{
width:200px;
height:200px;
line-height: 200px;
text-align: center;
}
.box-taiji .w{
position:absolute;
right:75px;
bottom:0;
z-index: 9999;
width:200px;
height:200px;
border-radius: 50%;
background-color: #000;
-webkit-transform:translateX(-12.5%);
transform:translateX(-12.5%);
/*transform:translateY(75%);*/
}
.box-taiji .w p{
width:200px;
height:200px;
line-height: 200px;
text-align: center;
color:#fff;
/*padding-left:50%;*/
}
.box-taiji .mask{
position:absolute;
left:0;
top:0;
z-index: 999;
width:0;
height:0;
border-width:200px;
border-style:solid;
border-top-color:#fff;
border-right-color:#000;
border-bottom-color:#000;
border-left-color:#fff;
border-radius: 50%;
-webkit-transform:rotate(-45deg);
transform:rotate(-45deg);
}
@keyframes huan{
from{transform:rotate(0deg);}
to{transform:rotate(360deg);}
}
@-webkit-frames huan{
from{transform:rotate(0deg);}
to{transform:rotate(360deg);}
}
@-webkit-keyframes huan{
from{transform:rotate(0deg);}
to{transform:rotate(360deg);}
}
@-webkit-frames huan{
from{transform:rotate(0deg);}
to{transform:rotate(360deg);}
}
.text{text-align: center;}
  </style>
</head>
<body>
<div class="box-taiji">
<div class="b"><p>•</p></div>
<div class="w"><p>•</p></div>
<div class="mask"></div>
</div>
<div class="text">
<h1>太极</h1>
<p>万物相生相克</p>
<p>两极变化无穷</p>
</div>
</body>
</html>
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值