Dividing long list of
  • tags into columns?
  • 后端 未结 3 2054
    闹比i
    闹比i 2020-12-05 19:23

    I\'ve got a list of about 30

  • in a
      . Is there any way, using CSS, to divide these into three columns of ten?

  • 3条回答
    •  臣服心动
      2020-12-05 19:38

      The following is tailored to be mobile friendly.

      div.a {
        background-color: #ffffff;
        border: 2px solid;
        margin: 0;
        overflow: auto;
        padding: 1%;
        text-align: left;
        word-wrap: break-word;
      }
      ul.a {
        list-style-type: none;
        margin: 0;
        padding: 0;
      }
      li.spacea {
        float: left;
        width: 2%;
      }
      li.thirda {
        color: #ff00ff;
        float: left;
        width: 32%;
      }
      li.thirdb {
        color: #ffff00;
        float: left;
        width: 32%;
      }
      li.thirdc {
        color: #00ffff;
        float: left;
        width: 32%;
      }
      • The quick brown fox jumped over the lazy dog.
      •  
      • The quick brown fox jumped over the lazy dog.
      •  
      • The quick brown fox jumped over the lazy dog.

    提交回复
    热议问题