老师麻烦检查下

来源:2-18 编程练习

豆包侠

2021-10-19 16:38:38

<!DOCTYPE html>

<html>

<head lang="en">

    <meta charset="UTF-8">

    <title>background-image</title>

    <style type="text/css">

       *{margin: 0 ;padding: 0;}

       div{

           width:800px;height: 1600px;

          background: 0px 0px/100% no-repeat url(http://climg.mukewang.com/582c3b780001a95103000090.jpg),

          0px 300px/100% no-repeat url(http://climg.mukewang.com/582c3b6d0001197603000090.jpg),

          0px 600px/100% no-repeat url(http://climg.mukewang.com/582c3b61000122dd03000090.jpg);

       

       }

    </style>

</head>

<body>

         <div></div>

</body>

</html>



写回答

1回答

好帮手慕星星

2021-10-19

同学你好,代码实现可以。但是div设置宽高有些大了,建议按照图片默认宽高调整

https://img.mukewang.com/climg/616e879509f6954c03620115.jpg

另外三张图片的位置可以用方位词top,center和bottom实现,简单一些,参考:

https://img.mukewang.com/climg/616e878f0909400209460339.jpg

祝学习愉快!

0

0 学习 · 40143 问题

查看课程