我的代碼:Textarea的CSS高度= 100%不適用於IE6/IE7?
<!DOCTYPE html>
<html>
<head>
<title>Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body {
background: none repeat scroll 0 0 #EFEFEF;
overflow: hidden;
position: relative;
margin: 0px;
padding: 10px;
}
div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {
margin: 0;
padding: 0;
}
#content{
height:200px;
}
fieldset,textarea{
border: 0 none;
}
#LeftPanel
{
width: 48%;
float: left;
height:100%;
}
.window {
border: 1px solid #ADADAD;
width: 100%;
float: left;
}
.top {
height: 25%;
}
.bottom {
height: 75%;
}
.code{
width:100%;
height:100%;
}
</style>
</head>
<body>
<div id="content">
<fieldset id="LeftPanel">
<div id="div_A" class="window top">
<textarea id="code_A" class="code">A</textarea>
</div>
<div id="div_B" class="window bottom">
<textarea id="code_B" class="code">B</textarea>
</div>
</fieldset>
</div>
</body>
</html>
它運作良好,在Chrome,火狐,IE8/IE9,但它並沒有在IE6/IE7工作。
在IE6/IE7:
在Firefox:
誰能幫我?謝謝!
僅供參考ie6太老了,可能已經過時,用戶使用ie7也很小,所以給予支持並不是一個好主意。 – 2012-01-12 05:02:33
你可以參考這個URL的IE風格http://www.virtuosimedia.com/dev/css/ultimate-ie6-cheatsheet-how-to-fix-25-internet-explorer-6-bugs#one-hundredpercent - 高達 – Murtaza 2012-01-12 05:04:50
但在中國,大量用戶使用ie6 – artwl 2012-01-12 05:05:15