当前位置:网站首页>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 )
边栏推荐
猜你喜欢

Canvas绘图2

Review of Metallurgical Physical Chemistry - gas liquid phase reaction kinetics

Idea configures the service (run dashboard) service, and multiple modules are started at the same time

Online word cloud generation (taking WordArt as an example)

Idea uses dev tool to realize hot deployment

Zotero——一款文献管理工具

树莓派WIFI一键连接配置

结果填空 凑算式(DFS*C语言)

Shell operation principle

GD32F407 移植FreeRTOS+Lwip
随机推荐
ArcMap中的距离工具条(Distance)
Invalid bound statement (not found): com.exam.mapper.UserMapper.findbyid
Competition arrangement in GIS field (incomplete statistics)
Example of MySQL processing legacy data
wangeditor(@4.7.15)-轻量级的富文本编辑器
三大缓存技术--localStorage、sessionStorage、Cookie
截图传入后台
标准C语言总结2
Review of metallurgical physical chemistry -- cathodic polarization, overpotential, anode and anode process in metal electrodeposition
C语言走迷宫
Zotero - a document management tool
CAD-GIS数据转换
Problem set in the project
Using Navicat or PLSQL to export CSV format, more than 15 digits will become 000 (e+19) later
树莓派蓝牙调试过程
curd组件中的时间设置
顺序表oj题目
uniapp-监听app是否有网络连接
ArcMap连接表格(Join)相关问题整理
Microsoft edge browser plug-in (1)