HTML页面缩小后如何有横向滚动条

overflow:scroll; /*任何时候都强制显示滚动条*/
overflow:auto; /*需要的时候会出现滚动条*/
overflow-x:auto; /*控制X方向的滚动条*/
overflow-y:auto; /*控制Y方向的滚动条*/

示例:
<HTML>
<HEAD>
<TITLE>测试表格内的滚动条</TITLE>
</HEAD>
<BODY>
<table>
<tr>
<td>表格内的滚动条:</td>
<td>
<div id="wins"
style="position:absolute;height:200;width:200;overflow:auto;background:#EEEEEE;">
<p>pppppppppppppppppppppppppppppppppppppppppppppppppp </p>
<p>pppppppppppppppppppppppppppppppppppppppppppppppppp </p>
<p>ppppppppppppppppppppppppp </p>
<p>ppppppppppppppppppppppppp </p>
<p>ppppppppppppppppppppppppp </p>
<p>ppppppppppppppppppppppppp </p>
<p>ppppppppppppppppppppppppp </p>
<p>ppppppppppppppppppppppppp </p>
<p>ppppppppppppppppppppppppp </p>
<p>ppppppppppppppppppppppppp </p>
<p>ppppppppppppppppppppppppp </p>
<p>ppppppppppppppppppppppppp </p>
</div>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<span οnmοuseοver='scrollb=setInterval("wins.scrollLeft-=10",100)'
οnmοuseοut=clearInterval(scrollb)>向左</span>
<span οnmοuseοver='scrollb=setInterval("wins.scrollTop-=10",100)'
οnmοuseοut=clearInterval(scrollb)>向上</span>
<span οnmοuseοver='scrollb=setInterval("wins.scrollLeft+=10",100)'
οnmοuseοut=clearInterval(scrollb)>向右</span>
<span οnmοuseοver='scrollb=setInterval("wins.scrollTop+=10",100)'
οnmοuseοut=clearInterval(scrollb)>向下</span>
</td>
</tr>
</table>
</BODY>
</HTML>
展开阅读全文

没有更多推荐了,返回首页