1、移动端显示滚动条
在移动端滚动条默认会隐藏,如何显示呢 ,需要添加以下代码了。并且需要给body或者外层盒子添加 rows 类名,这样滚动条就可以显示出来了
.rows {
/* height: 500px; */
/* overflow: hidden; */
overflow-y: scroll;
}
.rows::-webkit-scrollbar-track-piece {
background-color: rgba(0, 0, 0, 0);
border-left: 1px solid rgba(0, 0, 0, 0);
}
.rows::-webkit-scrollbar {
width: 15px;
height: 2px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.rows::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.5);
background-clip: padding-box;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
min-height: 10px;
}
.rows::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.5);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
<body class="rows">