
2、给dom元素设置相应的宽度,可以用style中的width。
3、再给dom元素设置overflow属性,水平滚动条就是overflow-x:scroll。这样当元素中的内容超出设置的宽度时就会出现滚动条。
示例:
<div style="overflow-x:scrollwidth:200pxwhite-space:nowrap">当内容超出设定的宽度时自动出现横向滚动条</div>
Dreamweaver 8如何给框架集添加滚动条?只要右边有滚动条 要在设计试图完成要求
<frameset rows="210%,300%,50%" cols="*" frameborder="0" style="overflow:scroll" >
<frame src="top.html" name="topFrame" scrolling="no" marginheight="0" noresize="true" marginwidth="0"/>
<frame src="zhong.html" name="leftFrame" scrolling="auto" marginwidth="0" noresize="true" marginheight="0" />
<frame src="footer.html" name="footerFrame" scrolling="auto" marginwidth="0" noresize="true" marginheight="0"/>
</frameset>
<noframes></noframes>
在frameset 标签内加上style="overflow:scroll"这个样式就可以出现右边的整页滚动条了
<div style="width:260pxheight:120px overflow:scroll border:1px solid"> 这里是你要显示的内容 </div> <div style="width:260pxheight:120px overflow-y:scroll border:1px solid"> 这里是你要显示的内容 </div> <div style="width:260pxheight:120px overflow-y:scroll scrollbar-base-color:#ff6600 border:1px solid"> 这里是你要显示的内容 </div>SCROLLBAR-FACE-COLOR(立体滚动条凸出部分的颜色)
SCROLLBAR-HIGHLIGHT-COLOR(滚动条空白部分的颜色)
SCROLLBAR-SHADOW-COLOR(立体滚动条阴影的颜色)
SCROLLBAR-ARROW-COLOR(上下按钮上三角箭头的颜色)
SCROLLBAR-BASE-COLOR(滚动条的基本颜色)
SCROLLBAR-DARK-SHADOW-COLOR(立体滚动条强阴影的颜色)
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)