[前端] chrome浏览器定义滚动条样式及字体中英对照

一、定义chrome浏览器滚动条样式

 

<style>
    .box::-webkit-scrollbar{  box-shadow:inset 0 0 .3em rgba(0,0,0,.4); background:-webkit-linear-gradient(left, transparent 0%, #dce2f3 50%, transparent 100%); border-radius:2em; margin:0 1em; height:1em; }
    .box::-webkit-scrollbar:hover{ box-shadow:inset 0 0 .6em rgba(0,0,0,.5); }
    .box::-webkit-scrollbar-thumb{ height:50%; border-radius:2em; cursor:pointer; background:-webkit-linear-gradient(top, #9ac4f8 0%, #5ca3fa 50%, #9ac4f8 100%);}
    .box::-webkit-scrollbar-button{ /*width:100%; height:8px; border:solid 1px red;*/} /* Custom button */

    .box::-webkit-scrollbar-button:start:decrement{} /* Custom start button */
    .box::-webkit-scrollbar-button:end:increment{} /* Custom end button */

    .box::-webkit-scrollbar-thumb:hover{ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); background:-webkit-linear-gradient(top, #9ac4f8 0%, #5ca3fa 50%, #9ac4f8 100%); }
</style>

 

 

 

二、字体中英对照

 

字体名称英文名称Unicode 编码
宋体SimSun\5B8B\4F53
新宋体NSimSun\65B0\5B8B\4F53
黑体SimHei\9ED1\4F53
微软雅黑Microsoft YaHei\5FAE\8F6F\96C5\9ED1
楷体_GB2312KaiTi_GB2312\6977\4F53_GB2312
隶书LiSu\96B6\4E66
幼园YouYuan\5E7C\5706
华文细黑STXihei\534E\6587\7EC6\9ED1
细明体MingLiU\7EC6\660E\4F53
新细明体PMingLiU\65B0\7EC6\660E\4F53

 

 

 

These are the pseudo class selectors. They allow for more specific selection of the parts, like when the scrollbar is in different states.


:horizontal
:vertical
:decrement
:increment
:start
:end 
:double-button
:single-button
:no-button
:corner-present
:window-inactive

参考链接:https://css-tricks.com/custom-scrollbars-in-webkit/

他人博客:http://www.lyblog.net/detail/314.html

 

欢迎关注分享录:http://fenxianglu.cn/

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

天空还下着雪

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值