通过设置标签属性,去掉无序编号自动换行,代码如下:

<!DOCTYPE html>
<html>
<head>
<style>
 
#pic_list
{
    display:block;
    white-space:nowrap;
    width:500px;
    overflow:auto;
}
#pic_list li
{
    width:80px;
    height:80px;
    margin:3px;
    background:red;
    display:inline-block;
}
</style>
 
</head>
<div id="pic_list">
  <ul>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
  </ul>
</div>
</body>
</html>

最后运行的样式如下:

去除li标签自动换行

 

 

 

相关文章:

  • 2021-07-13
  • 2021-11-17
  • 2021-12-03
  • 2021-12-09
  • 2022-12-23
  • 2022-01-14
  • 2021-10-27
  • 2021-11-09
猜你喜欢
  • 2021-05-17
  • 2022-12-23
  • 2021-07-20
  • 2021-06-11
  • 2022-12-23
  • 2021-06-26
相关资源
相似解决方案