老师,麻烦检查一下正确性和规范性,有没有需要优化的。
来源:2-11 编程练习
瑜瑜瑜
2021-01-07 15:39:29
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box {
width: 200px;
height: 200px;
position: relative;
}
.box .bd1 {
position: absolute;
width: 0;
height: 0;
border: 100px solid transparent;
border-left-color: red;
border-radius: 40%;
}
.box .bd2 {
position: absolute;
right: 20px;
width: 0;
height: 0;
border: 100px solid transparent;
border-right-color: red;
border-radius: 40%;
}
</style>
</head>
<body>
<div class="box">
<div class="bd1"></div>
<div class="bd2"></div>
</div>
</body>
</html>
1回答
同学你好,效果是正确的,不过代码还可以优化一下:
祝学习愉快~
相似问题
回答 1
回答 1