为什么我的另外2张图片不见了。只看见背景图
来源:7-2 编程练习
清致829
2019-05-17 12:40:51
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
.div1{
background:url('http://climg.mukewang.com/59c9f7ce0001839219034033.png');
width:2000px;
height:2500px;
position: relative;
}
.div2{
position: fixed;
top:50%;
width: 50px;
height: 200px;
margin-top: -100px;
}
.div3{
position:fixed;
top: 50%;
width:50px;
height:200px;
right:150px;
margin-top: -100px;
}
</style>
</head>
<body>
<div class="div1">
<div class="div2">
<img scr="http://climg.mukewang.com/5a3383c70001f1b702240364.png">
</div>
<div class="div3">
<img scr="http://climg.mukewang.com/5a3383d00001a3dd02240364.png">
</div>
</div>
</body>
</html>
1回答
好帮手慕小尤
2019-05-17
同学你好, 标签img中src属性写错了,所以另两张图片不见了应该是:<img src="">。在css div3中设置宽、高、右边距 符号是中文符号,应该为英文符号 : ,在代码中请注意符号的格式。祝学习愉快!
相似问题
回答 1