<style> div{position: absolute;} #main{position: relative;} img{ display: block; width:100%; height:100%} </style> </head> <body> <div id="main"> <div id="box1"> <div><img src="CTA.png" alt=""></div> <div><img src="CTAOver.png" alt=""></div> </div> <div id="box2"> <img src="logo.png" alt=""> </div> </div> </body>
上面的这段代码中出现的效果是box2中的logo 显示了,box1中的两张图片都没显示,如果将img的样式为什么会出现这种不一致的情况呢?
漂泊猫
Tracy_
Busy