天天看點

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);

}

  • 111
  • 222
  • 222
  • 222
  • 222
  • 222
  • 222
  • 222
  • 222
  • 222
  • 222
  • 222
  • 222
  • 222
  • 222