Lou*_*uis 1 css height textarea
如何让我<textarea>的身高达到100%并在IE7/6中工作?height:100%在所有其他浏览器中工作正常,但IE只是不想接受除特定值之外的任何其他内容.Javascript是一种可能的解决方案.
为了使元素在IE6中达到100%的高度,您需要指定其父元素的固定高度.如果您想使元素成为页面的全长,请应用高度:100%; html和body元素.
/*100% height of the parent element for IE6*/
#parent {height:500px;}
#child {height:100%;}
/*100% of the page length for IE6*/
html, body {height:100%;}
#fullLength {height:100%;}
Run Code Online (Sandbox Code Playgroud)
摘自:http://www.virtuosimedia.com/
我猜这同样适用于IE7.
| 归档时间: |
|
| 查看次数: |
8139 次 |
| 最近记录: |