老师,麻烦检查一下正确性和规范性,有没有需要优化的。

来源: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 {

            width200px;

            height200px;

            positionrelative;

        }

        .box .bd1 {

            positionabsolute;

            width0;

            height0;

            border100px solid transparent;

            border-left-colorred;

            border-radius40%;

        }

        .box .bd2 {

            positionabsolute;

            right20px;

            width0;

            height0;

            border100px solid transparent;

            border-right-colorred;

            border-radius40%;

        }

    </style>

</head>

<body>

    <div class="box">

        <div class="bd1"></div>

        <div class="bd2"></div>

    </div>

</body>

</html>


写回答

1回答

好帮手慕言

2021-01-07

同学你好,效果是正确的,不过代码还可以优化一下:

http://img.mukewang.com/climg/5ff6ce2309ab300905510311.jpg

http://img.mukewang.com/climg/5ff6ce36091dee9206140600.jpg

祝学习愉快~

1

0 学习 · 15276 问题

查看课程