源文件如下:
<html><head>
<meta http-equiv="content-type" content="text/html; charset=gb2312"> <style>
.line {
position:relative;
margin:10px 10%;
width:80%;
font-size:20px;
}
.cell {
position:fixed;
top:0px;
left:0px;
width:200px;
border:1px fluid #000;
background-color:#ddd;
color:#555;
}
</style>
</head><body><div class="line">
<div class="cell"> By Zach Spear Customers won't
</div>
<div class="cell" style="left: 210px;"> United Nations
</div>
<div class="cell" style="left: 420px;"> MIAMI (Reuters) -
</div>
<div class="cell" style="left: 630px;"> By Gabriel Madway -
product line-up ... </div>
</div></body></html>
怎么该啊,谢谢了
<html><head>
<meta http-equiv="content-type" content="text/html; charset=gb2312"> <style>
.line {
position:relative;
margin:10px 10%;
width:80%;
font-size:20px;
}
.cell {
position:fixed;
top:0px;
left:0px;
width:200px;
border:1px fluid #000;
background-color:#ddd;
color:#555;
}
</style>
</head><body><div class="line">
<div class="cell"> By Zach Spear Customers won't
</div>
<div class="cell" style="left: 210px;"> United Nations
</div>
<div class="cell" style="left: 420px;"> MIAMI (Reuters) -
</div>
<div class="cell" style="left: 630px;"> By Gabriel Madway -
product line-up ... </div>
</div></body></html>
怎么该啊,谢谢了
如果窗口宽度小于某个DIV的宽度时。
就把这些DIV的STYLE改一下么。
如果窗口宽度小于某个DIV的宽度时。
就把这些DIV的STYLE改一下么。
大概配置应该是这样的
.cell {
float:left;
width:200px;
border:1px fluid #000;
background-color:#ddd;
color:#555;
}