当前位置:网站首页>Set scroll bar
Set scroll bar
2022-07-28 05:48:00 【I want to be a talker】
Scroll bar
Scroll bar usage
overflow-y: Management of scrollbars when the content of an area exceeds its specified height ;
overflow-x: Management of scrollbars when the content of an area exceeds its specified width ;
overflow: It's equivalent to setting overflow-x and overflow-y
Parameters :
visible: Expand the area to show everything
auto: Add a scroll bar only if the content exceeds the limit
hidden: Always hide scroll bars
scroll: Always show scroll bar
Be careful !
1、 The setting of scroll bar only sets the fixed width ( Or high ) The block level area of is valid ( Because only block level areas can be set with width and height ). When setting the display of scroll bars , Only when the block level content area exceeds the range of block level elements , It will be displayed in the form of a scroll bar , You can scroll through the contents , The contents will not exceed the block level area .
2、 When setting the scroll bar , Generally, only one of the horizontal scroll bar and the vertical scroll bar is set . Because the scroll bar display is set when the area is exceeded , When the longitudinal direction can be extended , If it can be extended horizontally, there will be problems . One of the scrollbars cannot be displayed on the page . Such as below , The horizontal scroll bar will not display correctly . When the page viewport has scroll bars , I have more scrollbars on the page than the viewport will display , Conflict with each other , The scroll bar in the block level area written by yourself cannot be displayed correctly .
3、 When you want to completely hide the scroll bar of the entire browser viewport , Use scroll=“no”, Can hide scroll bar ;
Scroll bar style modification
Because the default scroll bar of each browser is different , When you use the scroll bar on the page , You can modify the style of the scroll bar .
<style> .bar {
height: 300px; width: 250px; overflow-y: scroll; border: 1px solid #ccc; margin-left: 400px; margin-top: 50px; } /* Set the style of the scroll bar Wide and high 、 Background color */ ::-webkit-scrollbar {
width: 10px; background-color: rgb(239, 217, 217); } /* Scroll bar slider */ ::-webkit-scrollbar-thumb {
border: 1px solid red; border-radius: 10px; background: pink; } </style>
Scroll bar after changing the style ( The colors are exaggerated for convenience , Not beautiful , But it is easy to distinguish )
边栏推荐
猜你喜欢

冶金物理化学复习 -- 金属电沉积过程中的阴极极化,超电势以及阳极和阳极过程
![[idea plug-in artifact] teaches you how to set all attributes in an entity class with one click of idea](/img/d6/4e69480c5ad5040ee48941ca0fcb37.png)
[idea plug-in artifact] teaches you how to set all attributes in an entity class with one click of idea

CAD-GIS数据转换

Arcgis Engine安装的若干问题

MYSQL之搭建数据库系列(一)——下载MYSQL

uniapp问题:“navigationBarTextStyle“报错:Invalid prop: custom validator check failed for prop “navigat

【uni-app】uni-app中scroll-into-view的使用

ArcGIS地图制作的注记、格网添加

DOM操作的案例

DOM--事件链、事件冒泡和捕获、事件代理
随机推荐
结果填空 啤酒和饮料
结果填空 马虎的算式(暴力解决)
Global event bus
ArcMap中的距离工具条(Distance)
Leetcode 随即链表的深拷贝
树莓派串口
顺序表的增删查改
C语言回顾(指针篇)
结果填空 购物单(教你用Excel解决)
uniapp-监听app是否有网络连接
js-简单的发布订阅类
顺序表oj题目
Invalid bound statement (not found): com.exam.mapper.UserMapper.findbyid
截图传入后台
Idea configures the service (run dashboard) service, and multiple modules are started at the same time
环形链表问题
蓝桥杯 方格填数
Review of metallurgical physical chemistry -- rate equations of complex reactions
操作文档树
基于XMind的E-R图制作