溢出自动里面一个div不工作在ie [英] Overflow auto inside a div not working in ie
本文介绍了溢出自动里面一个div不工作在ie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的代码 http://jsfiddle.net/FbC86/ 。如果您使用Chrome或Firefox打开此页面,单元格中的文本会通过垂直滚动条正确溢出。如果你打开它与Internet Explorer,它不能正常工作。
This is my code http://jsfiddle.net/FbC86/. If you open this page with Chrome or Firefox the text inside the cell is overflowing correctly through a vertical scrollbar. If you open it with Internet explorer it doesn't work properly.
我需要你的建议,因为我是新的web开发,我找不到任何解决方案这个问题。提前致谢!
部分代码:
I need your advice as i am new to web development and i cannot find any solution to this problem. Thanks in advance! Part of the code:
CSS
div.main
{
width:100%;
height:100%;
display:block;
position:relative;
overflow:auto;
}
div.transparent{
padding:3em;
background-color: rgba(255,255,255,0.7);
display:block;
}
HTML
...
<td colspan="7" valign="top" style="height:0;" >
<div class="main">
<div class="transparent">
Here goes a long text
</div</div></td>
...
推荐答案
a height
属性指向要溢出的div。
You need to add a height
attribute to the div you want to overflow.
这篇关于溢出自动里面一个div不工作在ie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文