<!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 >
  <ul>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
  </ul>
</div>
</body>
</html>

关键是对ul元素设置display:block;white-space:nowrap;
对li元素的宽度和高度进行设置,当设置百分比的时候可以达到均分的目的

相关文章:

  • 2021-06-27
  • 2022-02-10
  • 2022-01-13
  • 2022-03-01
  • 2021-11-22
  • 2022-12-23
  • 2021-11-21
猜你喜欢
  • 2021-11-22
  • 2022-12-23
  • 2022-03-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案