CSS overflow:hidden与position:absolute属性的覆盖性实例页面

回到相关文章 »

代码:

CSS代码:
.overflowHidden { display: block; height: 0; overflow: hidden; }
.positionAbsolute { position: absolute; }
                
HTML代码:
<p style="height: 200px;">
    <a href="#" class="overflowHidden">
        <img src="//image.zhangxinxu.com/image/study/s/s256/mm1.jpg" />
    </a>
</p>
<p style="height: 200px;">
    <a href="#" class="overflowHidden">
        <img class="positionAbsolute" src="//image.zhangxinxu.com/image/study/s/s256/mm1.jpg" />
    </a>
</p>
                

效果: