在IE中可以自定义滚动条的样式 ,基于webkit的浏览器现在也可以自定义其样式:

::-webkit-scrollbar              { /* 1 */ }  
::-webkit-scrollbar-button       { /* 2 */ }  
::-webkit-scrollbar-track        { /* 3 */ }  
::-webkit-scrollbar-track-piece  { /* 4 */ }  
::-webkit-scrollbar-thumb        { /* 5 */ }  
::-webkit-scrollbar-corner       { /* 6 */ }  
::-webkit-resizer                { /* 7 */ }  

::-webkit-scrollbar {

width: 12px;

}

::-webkit-scrollbar-track {

-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);

-webkit-border-radius: 10px;

border-radius: 10px;

border:1px solid #666666

}

::-webkit-scrollbar-thumb {

-webkit-border-radius: 10px;

border-radius: 10px;

background: rgba(255,0,0,0.8);

-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);

}

::-webkit-scrollbar-thumb:window-inactive {

background: rgba(255,0,0,0.4);

}

.test{

width:100px;

height:200px;

overflow:scroll;

border:1px solid #666666;

}

<div class="test">kfalsdfjlasjldf</div>

参考:

http://www.webkit.org/blog/363/styling-scrollbars/

http://css-tricks.com/9130-custom-scrollbars-in-webkit/

http://www.spectrum-research.com/V2/projects_scrollbar_generator.asp

css之-webkit-scrollbar的更多相关文章

  1. WebKit的CSS扩展(WebKit是私有属性)

    http://www.css88.com/webkit/-webkit-touch-callout/ -webkit-tap-highlight-color 是一个 不规范的属性(unsupporte ...

  2. 【WebKit】---WebKit的CSS扩展(WebKit是私有属性)

    1.-webkit-touch-callout 当你触摸并按住触摸目标时候,禁止或显示系统默认菜单.在iOS上,当你触摸并按住触摸的目标,比如一个链接,Safari浏览器将显示链接有关的系统默认菜单. ...

  3. css去除webkit内核的默认样式

    做移动端的朋友应该知道,iphone的默认按钮是个很恶心的圆角,select下拉框也有默认样式无法修改. 这时候可以用到 -webkit-appearance:none //去除默认样 在按钮和sel ...

  4. js 浏览器兼容css中webkit、Moz、O、ms...写法封装(es6语法)

    /** *浏览器兼容写法封装 */ let elementStyle = document.createElement('div').style let vendor = (() => { le ...

  5. [CSS] Showing horizontal scrollbar always for the table

    table { display: block; overflow: scroll; width: 200px; height:95vh; }

  6. webkit内核浏览器的CSS写法

    -webkit-tap-highlight-color: transparent; Mobile上点击链接高亮的时候设置颜色为透明 -webkit-user-select: none; 设置为无法选择 ...

  7. Webkit内核探究【2】——Webkit CSS实现

    注:[转载请注明文章来源.保持原样] 出处:http://www.cnblogs.com/jyli/archive/2010/01/31/1660364.html 作者:李嘉昱 CSS在Webkit中 ...

  8. Webkit内核探究【2】——css简介

    注:[转载请注明文章来源.保持原样] 出处:http://www.cnblogs.com/jyli/archive/2010/01/31/1660364.html 作者:李嘉昱 CSS在Webkit中 ...

  9. webkit

    HTML, 从HTML文档的开始到结束排列: <meta name="viewport" content="width=device-width, initial- ...

  10. 理解WebKit和Chromium(电子书)

    前言   基础篇 WebKit, WebKit2, Chromium和Chrome介绍 WebKit和Blink WebKit和Chromium代码目录结构介绍 WebKit和Chromium功能模块 ...

随机推荐

  1. spark-submit的参数名称解析

    执行时需要传入的参数说明 Usage: spark-submit [options] <app jar | Python file> [app options] 参数名称 含义 --mas ...

  2. Android Studio 1.1.0版本以上 优化编译

    本文不写内容,只是借用别人链接.不过大概内容都如下链接: http://blog.csdn.net/hyr83960944/article/details/38388429 http://bbs.it ...

  3. Codeforces Round #Pi (Div. 2)(A,B,C,D)

    A题: 题目地址:Lineland Mail #include <stdio.h> #include <math.h> #include <string.h> #i ...

  4. tengine 增加ngx_http_cache_purge_module 模块

    wget http://labs.frickle.com/files/ngx_cache_purge-2.1.tar.gz tar zxvf ngx_cache_purge-2.1.tar.gz -- ...

  5. how-apache-flink-enables-new-streaming-applications-part-1

    https://data-artisans.com/blog/how-apache-flink-enables-new-streaming-applications-part-1 http://www ...

  6. Flink KAFKA

    https://data-artisans.com/blog/kafka-flink-a-practical-how-to https://github.com/dataArtisans/kafka- ...

  7. 《转》冯森林:手机淘宝中的那些Web技术(2014年)

    Native APP与Web APP的技术融合已经逐渐成为一种趋势,使用标准的Web技术来开发应用中的某些功能,不仅可以降低开发成本,同时还可以方便的进行功能迭代更新.但是如何保证Web APP的流畅 ...

  8. slack机器人运维

    这里有一篇文章,够详细了:http://colobu.com/2015/11/04/create-a-slack-bot-with-golang/ 另外:这个py的库,test了一下,挺好使:http ...

  9. SAP NetWeaver BW 7.3介绍

    (摘自SAP 官方 EIM300 SAP NetWeaver BW 7.3 特色功能.前景展望与路线图)

  10. 使用卷积神经网络CNN训练识别mnist

    算的的上是自己搭建的第一个卷积神经网络.网络结构比较简单. 输入为单通道的mnist数据集.它是一张28*28,包含784个特征值的图片 我们第一层输入,使用5*5的卷积核进行卷积,输出32张特征图, ...