当前位置:网站首页>Daily page number style problems

Daily page number style problems

2020-11-09 19:54:47 Yi Han 123

problem

When the page number is over 1000 , The box of page number will be very ugly ; You can't go beyond the box

min-width&&padding solve

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      ul {
        margin: 0;
        display: flex;
        justify-content: flex-start;
      }
      li {
        margin-right: 2px;
        list-style: none;
        padding: 0 3px;
        min-width: 24px;
        height: 24px;
        box-sizing: border-box;
        border: 1px solid #ccc;
        border-radius: 2px;
        font-size: 10px;
        text-align: center;
        line-height: 24px;
      }
    </style>
  </head>
  <body>
    <div id="main">
      <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
        <li>15</li>
        <li>15</li>
        <li>15</li>
        <li>15</li>
        <li>152</li>
        <li>152</li>
        <li>152</li>
        <li>152</li>
        <li>152</li>
        <li>152</li>
        <li>1523</li>
        <li>1532</li>
        <li>1532</li>
        <li>1532</li>
        <li>1532</li>
      </ul>
    </div>
  </body>
</html>

Daily page number style problem

版权声明
本文为[Yi Han 123]所创,转载请带上原文链接,感谢