老师麻烦检查下
来源: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回答
同学你好,代码实现可以。但是div设置宽高有些大了,建议按照图片默认宽高调整

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

祝学习愉快!