老师帮忙看一下代码

来源:3-15 编程练习

dy12369

2021-12-03 20:07:32

<!DOCTYPE html>

<html>

    <head>

        <meta charset="UTF-8">

        <title></title>

        <style type="text/css">

           ol li:first-child {

               color:red;

           }

           ol li:last-child {

               color:blue;

           }

          ul>li:last-child>ol li:nth-of-type(2) {

              color:green;

          }

        </style>

    </head>

    <body>

        <ul>

            <li>

                家用电器

                <ol>

                    <li>冰箱</li>

                    <li>洗衣机</li>

                    <li>空调</li>

                </ol>

            </li>

            <li>

                清洁用品

                <ol>

                    <li>洗衣液</li>

                    <li>消毒液</li>

                    <li>洗厕液</li>

                </ol>

            </li>

            <li>

                妇婴用品

                <ol>

                    <li>奶粉</li>

                    <li>纸尿裤</li>

                    <li>奶瓶</li>

                </ol>

            </li>

        </ul>

    </body>

</html>


写回答

1回答

好帮手慕久久

2021-12-04

同学你好,效果不太对:

https://img.mukewang.com/climg/61aacdfc094ca90204710301.jpg

建议调整如下:

https://img.mukewang.com/climg/61aace18091737b607030179.jpg

祝学习愉快!

0

0 学习 · 15276 问题

查看课程