码迷,mamicode.com
首页 > 其他好文 > 详细

太极图

时间:2019-10-21 19:00:23      阅读:72      评论:0      收藏:0      [点我收藏+]

标签:code   img   idt   border   com   定位   ima   太极   tom   

<div class="taiji"></div>

.taiji {
width: 140px;
height: 280px;
border-radius: 100%;
/* background-color: red; */
border: 2px solid black;
border-left: 140px solid black;
position: relative;
}

.taiji::before {
content: "";
position: absolute;
right: 50%;
top: 0;
width: 40px;
height: 40px;
border-radius: 100%;
background: black;
border: 50px solid #ffffff;
}

.taiji::after {
content: "";
position: absolute;
right: 50%;
bottom: 0;
width: 40px;
height: 40px;
border-radius: 100%;
background: #fff;
border: 50px solid black;
}

 

技术图片

 

 

 

1.

.taiji {
width: 140px;
height: 280px;
border-radius: 100%;
/* background-color: red; */
border: 2px solid black;
border-left: 140px solid black;
position: relative;
}

技术图片

 

 

2.将两个图形定位到相应的位置

.taiji::before {
content: "";
position: absolute;
right: 50%;
top: 0;
width: 40px;
height: 40px;
border-radius: 100%;
background: black;
border: 50px solid #ffffff;
}

.taiji::after {
content: "";
position: absolute;
right: 50%;
bottom: 0;
width: 40px;
height: 40px;
border-radius: 100%;
background: #fff;
border: 50px solid black;
}

技术图片技术图片

 

太极图

标签:code   img   idt   border   com   定位   ima   太极   tom   

原文地址:https://www.cnblogs.com/zhanghaifeng123/p/11715197.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!