开发者

CSS: Overflow Auto and Z-index

开发者 https://www.devze.com 2023-04-13 06:21 出处:网络
Here\'s the link: http://jsfiddle.net/smnde/2/ 开发者_C百科Is there a way to make the list show up above the div when overflow:auto is set? Like in the second container?yes; you can display overflow

Here's the link: http://jsfiddle.net/smnde/2/

开发者_C百科

Is there a way to make the list show up above the div when overflow:auto is set? Like in the second container?


yes; you can display overflow div outside of anything div when the child is absolute position & it's parent didn't have position:relative

like this:

#button {
    border: 1px solid #999;
    margin: 5px;
}

#hidden {
     display: none;
    position: absolute;
    margin-top:-20px;
    left:190px;
    width: 50px;
    border: 1px solid #333;
}

check this http://jsfiddle.net/sandeep/smnde/26/


No, overflow will not display anything outside the box.

You can use a tooltip like hover instead with the hidden box outside the container.

Check: http://jsfiddle.net/smnde/9/

0

精彩评论

暂无评论...
验证码 换一张
取 消