如何设置iscroll滚动条样式
答案:2 悬赏:60
解决时间 2021-03-02 02:30
- 提问者网友:痞子房西
- 2021-03-01 22:04
如何设置iscroll滚动条样式
最佳答案
- 二级知识专家网友:颜值超标
- 2021-03-01 22:09
浏览器滚动条默认是灰色的,大多数是默认的,但是在网站建设过程中,往往后需要一些特殊的设置以适合整个页面,比如一个全flash网站,整个页面以深绿色为主,此时把滚动条也设置成绿色的话,整个网页显得统一起来,美观上更上一个层次。 那么如何设置滚动条的样式呢?其实很简单,只需要在网页中加一些样式就可以了,代码如下:BODY {
SCROLLBAR-FACE-COLOR: rgb(0,204,0);
SCROLLBAR-3DLIGHT-COLOR: rgb(0,207,116);
SCROLLBAR-DARKSHADOW-COLOR: rgb(0,227,163);
}注:例子中滚动条是设置成绿色的,颜色可以根据需要或个人喜好来定,只需改变RGB的数值即可。
SCROLLBAR-FACE-COLOR: rgb(0,204,0);
SCROLLBAR-3DLIGHT-COLOR: rgb(0,207,116);
SCROLLBAR-DARKSHADOW-COLOR: rgb(0,227,163);
}注:例子中滚动条是设置成绿色的,颜色可以根据需要或个人喜好来定,只需改变RGB的数值即可。
全部回答
- 1楼网友:嗷呜我不好爱
- 2021-03-01 22:18
n’t like the default scrollbar styling and you think you could do better. help yourself! iscroll makes dressing the scrollbar a snap. first of all set the scrollbars option to 'custom':
var myscroll = new iscroll('#wrapper', {
scrollbars: 'custom'
});
then use the following css classes to style the little bastards.
.iscrollhorizontalscrollbar, this is applied to the horizontal container. the element that actually hosts the scrollbar indicator.
.iscrollverticalscrollbar, same as above but for the vertical container.
.iscrollindicator, the actual scrol
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯