我想在html中弄一个水平的滚动条怎么弄?

我想在html中弄一个水平的滚动条怎么弄?,第1张

1、在html中定义好一个dom标签,可以是body或者div等等。

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(立体滚动条强阴影的颜色)


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/11897543.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-19
下一篇2023-05-19

发表评论

登录后才能评论

评论列表(0条)

    保存