HTML和css内部样式

相关标签: # css# html# webkit# edge
简单利用HTML和css内部样式呈现出太极图
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body {
background-color: #666;
}
.box {
position: relative;
background-color: #fff;
width: 300px;
height: 300px;
margin: 200px auto;
border-radius: 50%;
}
.black {
float: left;
left: 0;
height: 300px;
width: 150px;
background-color: #050505;
border-radius: 150px 0 0 150px;
}
.h1 {
position: absolute;
right: 75px;
background-color: #050505;
width: 150px;
height: 150px;
border-radius: 50%;
}
.hy {
position: absolute;
right: 52px;
top: 52px;
width: 30px;
height: 30px;
background-color: #fff;
border-radius: 50%;
}
.b1 {
position: absolute;
left: 75px;
top: 150px;
background-color: #fff;
width: 150px;
height: 150px;
border-radius: 50%;
}
.by {
position: absolute;
right: 52px;
top: 52px;
width: 30px;
height: 30px;
background-color: #050505;
border-radius: 50%;
}
</style>
</head>
<body>
<div class="box">
<div class="black"></div>
<div class="h1">
<div class="hy"></div>
</div>
<div class="b1">
<div class="by"></div>
</div>
</div>
</body>
</html>
文章来源: https://blog.51cto.com/u_15887125/5890309
特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报