css画太极图代码分享
更新:HHH   时间:2023-1-7


这篇文章主要介绍“css画太极图代码分享”,在日常操作中,相信很多人在css画太极图代码分享问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”css画太极图代码分享”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

代码如下:


#yin-yang {
   width: 96px;
   height: 48px;
   background: #eee;
   border-color: red;
   border-style: solid;
   border-width: 2px 2px 50px 2px;
   border-radius: 100%;
   position: relative;
}
#yin-yang:before {
   content: "";
   position: absolute;
   top: 50%;
   left: 0;
   background: #eee;
   border: 18px solid red;
   border-radius: 100%;
   width: 12px;
   height: 12px;
}
#yin-yang:after {
   content: "";
   position: absolute;
   top: 50%;
   left: 50%;
   background: red;
   border: 18px solid #eee;
   border-radius:100%;
   width: 12px;
   height: 12px;
}

到此,关于“css画太极图代码分享”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注天达云网站,小编会继续努力为大家带来更多实用的文章!

返回web开发教程...