how to align all my li on one line?

前端 未结 7 1299
灰色年华
灰色年华 2020-12-31 02:57

my CSS

ul{
overflow:hidden;
}
li{
display:inline-block;
}

my HTML

  • a
  • b
7条回答
  •  南笙
    南笙 (楼主)
    2020-12-31 03:22

    Other than white-space:nowrap; also add the following CSS

    ul li{
      display: inline;
    }
    

提交回复
热议问题