当前位置:网站首页>Hidden scroll bar on PC
Hidden scroll bar on PC
2022-06-28 08:13:00 【Mediocrity and laziness】
In setting up the overflow:auto Using pseudo element selectors on elements of ::-webkit-scrollbar, See the following examples for specific use
<style type="text/css">
.li-group {
width: 500px;
height: 300px;
border: 1px solid red;
overflow-y: auto;
}
.li-group::-webkit-scrollbar {
display: none
}
li {
width: 100%;
height: 50px;
}
</style>
</head>
<body>
<ul class="li-group">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
</ul>
</body>
If you need to be compatible with other browsers, you can use the following method
.outer-container,.content {
width: 200px; height: 200px;
}
.outer-container {
position: relative;
overflow: hidden;
}
.inner-container {
position: absolute; left: 0;
overflow-x: hidden;
overflow-y: scroll;
}
.inner-container::-webkit-scrollbar {
display: none;
}
<div class="outer-container">
<div class="inner-container">
<div class="content">
......
</div>
</div>
</div>
In essence, it is to put another one on the outermost layer overflow:hidden Box , The size of the inner content is the same as that of the outer nested box .
边栏推荐
- The preliminary round of the sixth season of 2022 perfect children's model Foshan competition area came to a successful conclusion
- 安装nrm后,使用nrm命令报错internal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, ‘string‘, value)
- 你了解TCP协议吗(二)?
- Study notes 22/1/17
- MySQL two table connection principle (understand join buf)
- 图像翻译/Transformer:ITTR: Unpaired Image-to-Image Translation with Transformers用Transfor进行非配对图像对图像的转换
- asp. Net datalist when there are multiple data displays
- Prometheus service discovery
- js运算符的优先级
- SQL master-slave replication setup
猜你喜欢

The maximum number of Rac open file descriptors, and the processing of hard check failure

Vagrant installation

SQL master-slave replication setup

MySQL two table connection principle (understand join buf)

Jenkins' common build trigger and hook services (V)

Airflow2.1.1 summary of the pits stepped on in actual combat!!

Unity 获取当前物体正前方,一定角度、距离的坐标点

SOC serial port configuration

sql主从复制搭建

关于在cmd中MySQL不能插中文数据的原因
随机推荐
Localization SoC development plan
SQL master-slave replication setup
PC端隐藏滚动条
SQL analysis (query interception analysis for SQL optimization)
Airflow2.1.1 ultra detailed installation document
【学习笔记】模拟
Prometheus service discovery
Oracle view tablespace usage
Airflow2 configuration windows azure SSO details based on oauth2 protocol
B_ QuRT_ User_ Guide(26)
探讨gis三维系统在矿山行业中的应用
Ambari (V) ---ambari integrated Azkaban (valid for personal test)
Image translation /transformer:ittr: unpaired image to image translation with transformers
SQL Master slave Replication Build
【js】-【节流、防抖函数】
Jacobian matrix J commonly used in slam
SOC clock configuration
Vagrant installation
ROS 笔记(08)— 服务数据的定义与使用
三角变换公式