滚动条代码html(html里面的滚动条代码怎么写啊)

本文目录
html里面的滚动条代码怎么写啊
《div id="bar"》
《span id="topBtn"》《i id="top"》《/i》《/span》
《div id="block-box"》
《span id="block"》《/span》
《/div》
《span id="downBtn"》《i id="down"》《/i》《/span》
《/div》
CSS样式:有点丑,凑活着看吧:
#bar {position:relative; width:20px; height:380px; float:right; background:#ccc; border-radius:5px; display:none;}
#topBtn {width:20px; height:20px; position:absolute; border-radius:5px;}
#top {border:7px dashed transparent; border-bottom:7px solid yellow; position:absolute; top:0px; left:3px;}
#downBtn {width:20px; height:20px; position:absolute; border-radius:5px; bottom:0px; left:0px}
#down {border:7px dashed transparent; border-top:7px solid yellow; position:absolute; bottom:0px; left:3px;}
#block-box {width:20px; height:340px; border-radius:5px; position:absolute; top:20px; left:0px;}
#block {width:20px; border-radius:5px; position:absolute; background:red; height:0px;}
html滚动文字代码是什么
《marquee direction=up behavior=scroll loop=3 scrollamount=1 scrolldelay=10 align=top bgcolor=#ffffff height=300 width=30% hspace=20 vspace=10 onmouseover=this.stop() onmouseout=this.start()》 此处输入滚动内容 《/marquee》
◎ direction表示滚动的方向,值可以是left,right,up,down,默认为left
◎ behavior表示滚动的方式,值可以是scroll(连续滚动)slide(滑动一次)alternate(往返滚动)
◎ loop表示循环的次数,值是正整数,默认为无限循环
◎ scrollamount表示运动速度,值是正整数,默认为6
◎ scrolldelay表示停顿时间,值是正整数,默认为0,单位似乎是毫秒
◎ align表示元素的垂直对齐方式,值可以是top,middle,bottom,默认为middle
◎ bgcolor表示运动区域的背景色,值是16进制的RGB颜色,默认为白色
◎ height、width表示运动区域的高度和宽度,值是正整数(单位是像素)或百分数,默认width=100% height为标签内元素的高度
◎ hspace、vspace表示元素到区域边界的水平距离和垂直距离,值是正整数,单位是像素。
◎ onmouseover=this.stop() onmouseout=this.start()表示当鼠标以上区域的时候滚动停止,当鼠标移开的时候又继续滚动。

更多文章:
avantage怎么设置为中文(Avantage安装丢失GIT)
2026年10月15日 03:00
activex控件未注册怎么办(登陆视频监控网页时提示activex控件未注册,怎么解决)
2026年10月14日 20:30
excel连接sql数据库教程(excel怎么连接sql数据库)
2026年10月14日 19:40








