强制元素显示外溢出隐藏 [英] force element to display outside of overflow hidden
本文介绍了强制元素显示外溢出隐藏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这可能是尝试不可能的,但我想显示一个元素之外的 overflow:hidden
。我知道这没有任何意义,事情是按他们应该的工作,但只是想检查是否有一个方法。
最好用这个JSFiddle描述 http://jsfiddle.net/NUNNf/4/
c> c> c> $ $ b
根据您的具体应用,您可以使用以下结构:
.container {position:fixed; top:30px; left:50px; height:30px; width:300px; background:red;}。outer {overflow:hidden;}。inner {position:absolute;}。show-up {width:100px; height:300px;背景:绿色;位置:相对; margin-left:20px;}
< div class = container> < div class =outer> < div class =inner>< / div> < / div> < div class =show-up>这需要显示其所有高度的300像素< / div>< / div>
This is probably attempting the impossible, but I would like to display an element outside of an element that is overflow: hidden
. I know that makes no sense and things are working as they should, but just wanted to double check to see if there is a way.
Best described with this JSFiddle http://jsfiddle.net/NUNNf/4/
解决方案
The overflow:hidden
definition will hide anything inside that element that extends beyond its bounds.
Depending on your specific application, you may be able to use a structure like this:
.container {
position: fixed;
top: 30px;
left: 50px;
height: 30px;
width: 300px;
background: red;
}
.outer {
overflow: hidden;
}
.inner {
position: absolute;
}
.show-up {
width: 100px;
height: 300px;
background: green;
position: relative;
margin-left: 20px;
}
<div class="container">
<div class="outer">
<div class="inner"></div>
</div>
<div class="show-up">this needs to show up ALL 300 pixels high of it</div>
</div>
这篇关于强制元素显示外溢出隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文