说一下问题描述,最外面的父元素overflow-parent设置了overflow:hidden,
然后子元素overflow-child没有设置overflow,设置了relative,为其包含的绝对定位的元素进行位置确定,这个元素点击时高度增加到300px.
.overflow-parent{ width: 200px; height: 200px; border: 1px solid #ccc; overflow: hidden;}.overflow-child{ position: relative; width: 100px; height: 198px; border: 1px solid blue;}.position{ position: absolute; right: 10px; background: #000; bottom: top; top: 110px; z-index: 100; width: 50px; height: 50px; }.height{ height:300px;} function addHeight(htmlObj){ $(htmlObj).toggleClass("height");}
查看更多关于overflow:hiddden与绝对定位的应用场景的事例_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did108999