图片与JavaScript配合做出个性滚动条
* { margin:0; padding:0; }
body { margin:20px 0 400px 20px; font:12px Arial; }
h1 { font-size:14px; }
ol { margin:20px; line-height:160%; }
#out {
position:relative;
width:500px;
height:300px;
margin:100px 0 100px 80px;
border:1px solid #369;
overflow:hidden;
}
#content {
width:520px;
height:100%;
overflow:auto;
-moz-user-select:none;
}
#scrollBar,#scrollBarHandle,.scroll_bar_top,.scroll_bar_top_a,.scroll_bar_bottom,.scroll_bar_bottom_a {
background-image:url(http://files.jb51.net/demoimg/200910/un_bg_scrollBar.gif);
}
#scrollBar {
position:absolute;
top:0;
right:0;
z-index:9;
width:14px;
height:100%;
background-repeat:repeat-y;
background-position:-42px 0;
float:left;
}
#scrollBarTop,#scrollBarHandle,#scrollBarBottom {
position:absolute;
left:0;
cursor:default;
}
#scrollBarTop,#scrollBarBottom {
width:100%;
height:14px;
color:#fff;
text-align:center;
}
#scrollBarTop { top:0; }
#scrollBarBottom { bottom:0; }
#scrollBarHandle { width:100%; background-repeat:repeat-y; background-position:-28px 0; }
.scroll_bar_top { background-position:0 0; }
.scroll_bar_top_a { background-position:-14px 0; }
.scroll_bar_bottom { background-position:-56px 0; }
.scroll_bar_bottom_a { background-position:-70px 0; }
fsdfsfsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfsfsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfsfsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs11111111fsdfs
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
推荐阅读
Jquery Ajax.ashx 高效分页实现代码
以前的我,用惯了 UpdatePanel UpdateProgress 等控件,甚至到了滥用的程度,只是一味的追求无刷新,一边弄这 loading 图片 提示,这样貌似更美观,但是 感觉 更损失了性能, 而且有时候还破坏了网站的完整性。 但>>>详细阅读
本文标题:图片与JavaScript配合做出个性滚动条
地址:http://www.17bianji.com/kaifa2/JS/27917.html
1/2 1