失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > html左右超出显示滚动条 div内容宽度超出边界后怎样设置为左右滑动 而且不显示滚动条?...

html左右超出显示滚动条 div内容宽度超出边界后怎样设置为左右滑动 而且不显示滚动条?...

时间:2022-12-02 10:05:28

相关推荐

html左右超出显示滚动条 div内容宽度超出边界后怎样设置为左右滑动 而且不显示滚动条?...

div内容宽度超出边界后怎样设置为左右滑动,而且不显示滚动条?

纯手写 滚动条隐藏掉就行了

CSS:

*{

margin:0px;padding:0px;

}

.wrap{

overflow: hidden;

height: 40px;

}

.cont{

height: 60px;

overflow-x: auto;

overflow-y:hidden ;

position: relative;

}

.state {

left: 0px;

top: 0px;

position: absolute;

height: 60px;

background-color: rgb(84, 46, 69);

overflow-x: auto;

white-space: nowrap;

display: flex;

}

.state li{

display: inline-block;

float: left;

font-size: 13px;

text-decoration: none;

color: #999;

padding: 1px 5px;

border-bottom: 2px solid rgb(84, 46, 69);

}

.state .active {

font-weight: bold;

color: #ff6c00;

border-color: rgb(84, 46, 69);

}

111222222222222222222222222222222222222222222

如果觉得《html左右超出显示滚动条 div内容宽度超出边界后怎样设置为左右滑动 而且不显示滚动条?...》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。