位置: IT常识 - 正文

滚动条基本样式设置(滚动条基本样式有哪些)

编辑:rootadmin
滚动条基本样式设置 ::-webkit-scrollbar 系列属性详细使用说明 ::-webkit-scrollbar注意:如果没有设置滚动溢出的相关属性,滚动条样式系列属性不会生效(resize 除外)。属性::-webkit-scrollbar 整个滚动条。::-webkit-scrollbar-button 滚动条上的按钮(上下箭头)。::-webkit-scrollbar-thumb 滚动条上的滚动滑块。::-webkit-scrollbar-track 滚动条轨道。::-webkit-scrollbar-track-piece 滚动条没有滑块的轨道部分。::-webkit-scrollbar-corner 当同时有垂直滚动条和水平滚动条时交汇的部分。通常是浏览器窗口的右下角。::-webkit-resizer 出现在某些元素底角的可拖动调整大小的滑块。注意:该系列属性在没有优先设置 ::-webkit-scrollbar 时,其他滚动条相关样式不会生效(resize 除外)。常用:::-webkit-scrollbar、::-webkit-scrollbar-thumb、::-webkit-scrollbar-track(示例见“基本使用”)属性使用示例未使用该系列属性时的样式 后续设置比较强烈的颜色,易与区分属性生效的部分。::-webkit-scrollbar 整个滚动条<div> <div class="father"> <div class="child">子元素,高度大于父元素,撑开父元素</div> </div></div><style>.father { background: #eee; width: 400px; height: 600px; overflow-y: auto; margin: 50px auto;}.child { height: 700px; font-size: 20px; font-weight: bold;}::-webkit-scrollbar { /* 设置滚动条宽度 */ width: 20px; /* 设置滚动条背景色 */ background: blue;}</style>

推荐整理分享滚动条基本样式设置(滚动条基本样式有哪些),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:滚动条动画效果如何实现,滚动条动画效果如何实现,滚动条基本样式是什么,滚动条怎么实现,滚动条基本样式是什么,滚动条设置样式,滚动条基本样式怎么设置,滚动条基本样式怎么设置,内容如对您有帮助,希望把文章链接给更多的朋友!

::-webkit-scrollbar-button 滚动条上的按钮(上下箭头)<div> <div class="father"> <div class="child">子元素,高度大于父元素,撑开父元素</div> </div></div><style>.father { background: #eee; width: 400px; height: 600px; overflow-y: auto; margin: 50px auto;}.child { height: 700px; font-size: 20px; font-weight: bold;}::-webkit-scrollbar { /* 设置滚动条宽度 */ width: 20px; /* 设置滚动条背景色 */ background: blue;}::-webkit-scrollbar-button {/* 滚动条上下箭头的颜色 */ background: yellow;}</style>

::-webkit-scrollbar-thumb 滚动条上的滚动滑块<div> <div class="father"> <div class="child">子元素,高度大于父元素,撑开父元素</div> </div></div><style>.father { background: #eee; width: 400px; height: 600px; overflow-y: auto; margin: 50px auto;}.child { height: 700px; font-size: 20px; font-weight: bold;}::-webkit-scrollbar { /* 设置滚动条宽度 */ width: 20px; /* 设置滚动条背景色 */ background: blue;}::-webkit-scrollbar-button { /* 滚动条上下箭头的颜色 */ background: yellow;}::-webkit-scrollbar-thumb { /* 滚动条滑块圆角 */ border-radius: 8px; /* 滚动条滑块背景色 */ background: skyblue;}</style>

::-webkit-scrollbar-track 滚动条轨道<div> <div class="father"> <div class="child">子元素,高度大于父元素,撑开父元素</div> </div></div><style>.father { background: #eee; width: 400px; height: 600px; overflow-y: auto; margin: 50px auto;}.child { height: 700px; font-size: 20px; font-weight: bold;}::-webkit-scrollbar { /* 设置滚动条宽度 */ width: 20px; /* 设置滚动条背景色 */ background: blue;}::-webkit-scrollbar-button { /* 滚动条上下箭头的颜色 */ background: yellow;}::-webkit-scrollbar-thumb { /* 滚动条滑块圆角 */ border-radius: 8px; /* 滚动条滑块背景色 */ background: skyblue;}::-webkit-scrollbar-track { /* 滚动条轨道背景色 */ background: orange; /* 滚动条轨道圆角 */ border-radius: 10px;}</style>滚动条基本样式设置(滚动条基本样式有哪些)

::-webkit-scrollbar-track-piece 滚动条没有滑块的轨道部分<div> <div class="father"> <div class="child">子元素,高度大于父元素,撑开父元素</div> </div></div><style>.father { background: #eee; width: 400px; height: 600px; overflow-y: auto; margin: 50px auto;}.child { height: 700px; font-size: 20px; font-weight: bold;}::-webkit-scrollbar { /* 设置滚动条宽度 */ width: 20px; /* 设置滚动条背景色 */ background: blue;}::-webkit-scrollbar-button { /* 滚动条上下箭头的颜色 */ background: yellow;}::-webkit-scrollbar-thumb { /* 滚动条滑块圆角 */ border-radius: 8px; /* 滚动条滑块背景色 */ background: skyblue;}::-webkit-scrollbar-track { /* 滚动条轨道背景色 */ background: orange; /* 滚动条轨道圆角 */ border-radius: 10px;}::-webkit-scrollbar-track-piece { /* 滚动条轨道背景色 */ /* 覆盖在轨道上方,黑色半透明与橙色叠加 */ background: rgba(0, 0, 0, 0.3);}</style>

::-webkit-scrollbar-corner 当同时有垂直滚动条和水平滚动条时交汇的部分。通常是浏览器窗口的右下角<div> <div class="father"> <div class="child">子元素,高度大于父元素,撑开父元素</div> </div></div><style>.father { background: #eee; width: 400px; height: 600px; overflow-y: auto; margin: 50px auto;}.child { height: 700px; width: 700px; font-size: 20px; font-weight: bold;}::-webkit-scrollbar { /* 设置滚动条宽度 */ width: 20px; /* 设置滚动条背景色 */ background: blue;}::-webkit-scrollbar-button { /* 滚动条上下箭头的颜色 */ background: yellow;}::-webkit-scrollbar-thumb { /* 滚动条滑块圆角 */ border-radius: 8px; /* 滚动条滑块高度 */ height: 100px; /* 滚动条滑块背景色 */ background: skyblue;}::-webkit-scrollbar-track { /* 滚动条轨道背景色 */ background: orange; /* 滚动条轨道圆角 */ border-radius: 10px;}::-webkit-scrollbar-track-piece { /* 滚动条轨道背景色 */ /* 覆盖在轨道上方,黑色半透明与橙色叠加 */ background: rgba(0, 0, 0, 0.3);}::-webkit-scrollbar-corner { /* 横向、纵向滚动条的交汇背景色 */ background: red;}</style>

::-webkit-resizer 出现在某些元素底角的可拖动调整大小的滑块<div> <div class="father"> <div class="child">子元素,高度大于父元素,撑开父元素</div> </div></div><style>.father { background: #eee; /* 原始宽度为 400px,下方图示为拖拽后的样式,明显比 400px 宽 */ width: 400px; height: 600px; /* 设置不溢出,其他滚动条样式设置会失效 */ overflow: hidden; /* 父元素设置可拖拽属性 */ resize: horizontal; margin: 50px auto;}.child { height: 700px; width: 700px; font-size: 20px; font-weight: bold;}::-webkit-resizer { /* 设置右下角可拖拽部分的背景色 */ background: rgba(0, 0, 0, 0.3);}</style>

基本应用<div> <div class="father"> <div class="child">子元素,高度大于父元素,撑开父元素</div> </div></div><style>.father { background: #eee; width: 400px; height: 600px; overflow-y: auto; margin: 50px auto;}.child { height: 700px; font-size: 20px; font-weight: bold;}::-webkit-scrollbar { width: 5px; background: #eee;}::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.3); border-radius: 3px;}::-webkit-scrollbar-thumb { border-radius: 3px; height: 100px; background-color: #ccc;}</style>

兼容性

本文链接地址:https://www.jiuchutong.com/zhishi/298363.html 转载请保留说明!

上一篇:【玩转CSS】一文带你了解浮动(css转换器)

下一篇:Docker镜像多架构构建(docker运行多个镜像)

  • 个体工商户核定征收
  • 附加税计提会计科目
  • 免抵退税和留抵退税可以一起退吗
  • 建筑劳务公司工人工资计入什么科目
  • 理事单位和事业单位的区别
  • 国外酒店打印的住宿单可以入账吗
  • 税票百分之十三怎么算
  • 事假工资在税前扣除标准
  • 错误的累计折旧结转会计分录如何调整
  • 农产品进项抵扣政策
  • 农产品核定扣除范围
  • 哪些发票可以进账认证
  • 股权继承印花税单方交
  • 劳务费个税申报税率
  • 金税三期个人客户端在哪下载
  • 专票税率开错了有什么影响
  • 建筑施工企业购进材料会计分录
  • 利润表的上期金额和本期金额之间的关系
  • 会计核算的主要依据是什么
  • 免抵退不得免征和抵扣是什么意思
  • 购买展示柜怎么做会计分录
  • php数组查找函数
  • window10系统有几种
  • filecopyutils.copy上传文件
  • rtc resume
  • 长期待摊费用的概念
  • wwwxxx域名选择(www.xxx.com或者.cn)
  • 整体租赁经营模式是什么
  • php多维数组遍历输出
  • 待处理流动资产净损失在资产负债表中
  • 金蝶账无忧待遇和金蝶一样吗
  • 残保金怎么核算
  • 固定资产闲置能报废吗
  • php接口技术实例分析
  • 购物车html模板
  • 净化器 ccm
  • fsck命令详解
  • 红字发票信息表盖什么章
  • 应收利息的罚息是复利吗
  • 房地产企业的开发成本和开发费用有什么区
  • 水果发票税率是几个点
  • 工会的钱怎么取出来
  • mysql无法连接到服务器
  • 财务软件费用可以抵税吗
  • 期初和期末余额是什么意思
  • 发放职工工资是什么支出
  • 注销公司需要承担什么责任
  • 金税四期上线后如何查虚开
  • 现金日记账支出写借方还是贷方
  • 超期未备案可以投诉么
  • 会计凭证审核的主要内容
  • 收到客户提供代付发票
  • 公司给公司的工会拨款
  • mysql5.7解压版安装步骤
  • sql 复合语句
  • win7升级win8.1
  • ubuntu 挂载iso文件
  • ubuntu调出命令行
  • 取消windows开机登录密码
  • win7旗舰版和家庭版哪个对电脑要求低
  • xp系统如何禁止开机启动软件
  • 电脑久了就会高温
  • WIN7系统如何设置自动关机
  • rteng7.exe - rteng7是什么进程 有什么用
  • nerosmartstart.exe - nerosmartstart是什么进程 作用是什么
  • linuxmint设置中文
  • android break
  • cssid和class的区别
  • unity3d面试题摘选(全)
  • css下margin、padding、border、background和font缩写示例
  • java list和array list区别
  • python获取文件内所有函数
  • Unity3D游戏开发标准教程
  • 一个android项目一般包含哪些目录?各有什么用途?
  • javascript作用域链
  • 无偿转让股权要交税吗
  • 个体工商户地税没有注销有影响吗
  • 进口lng需要什么资质
  • 江苏电子票据
  • 河北省电子税务局app下载
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设