阴阳太极图

html代码:

<body>
    <div id=yinyang></div>
    <p>道生一,一生二,二生三,三生万物</p>
</body>

css代码:

body{
  background:#444;
}
@keyframes spin{
  from{
    transform:rotate(0deg);
  }
  to{
    transform:rotate(360deg);
  }
}
#yinyang{
  width:200px;
  height:200px;
  border-radius:50%;
  background: linear-gradient(to bottom, #ffffff 0%,#ffffff 50%,#000000 50%,#000000 100%);
  position:relative;
  margin:100px auto 30px;
  animation-name:spin;
  animation-duration:1s;
  animation-iteration-count:infinite;
  animation-timing-function:linear;
}
#yinyang::before{
  content:'';
  width:20px;
  height:20px;
  border-radius:50%;
  background:#fff;
  position:absolute;
  top:50px;
  left:0;
  border:40px solid black;
}
#yinyang::after{
  content:'';
  width:20px;
  height:20px;
  border-radius:50%;
  background:#000;
  position:absolute;
  top:50px;
  right:0;
  border:40px solid white;
}
p{
  color:#fff;
  text-align:center;
}

输出样式:

太极阴阳图.PNG
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容