移动端实现横向滚动
方法一
.users {
display: -webkit-box;
overflow-x: auto;
}
.users::-webkit-scrollbar {
display: none;
}
.users .user-item {
display: block;
width: 3.8rem;
box-sizing: border-box;
margin-right: 0.2rem;
color: #333;
text-align: center;
position: relative;
padding-top: 0.5rem;
}
.users .user-item:last-child {
margin-right: 0;
}
.users .user-item .show-more:hover img {
content: url('/images/home/ic_up_hover@2x.png');
}
方法二
ul {
width: 100%;
height: 85px;
white-space: nowrap;
overflow-x: auto;
padding: 0 0.24rem;
}
ul li:not(:last-child) {
margin-right: 40px;
}
如何设置字号小于12px
font-size: 12px;
transform: scale(0.8);