移动端第十三章多列

    科技2022-08-14  90

    多列

    属性描述column-count规定元素应该被分隔的列数column-gap规定列之间的间隔column-rule设置列边框与border写法一样column-span规定元素应该横跨的列数column-width规定列的宽度columns规定设置 column-width 和 column-count 的简写属性

    实例:

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> *{ margin: 0; padding: 0; } div{ width: 1900px; border: 1px solid red; /*分割列数*/ /*column-count: 3;*/ /*设置列之间的宽度*/ column-gap : 190px; /*设置列的样式*/ column-rule:13px solid red; /*规定列数宽度*/ /*column-width:700px;*/ /*复合属性*/ columns:3 400px; } h1{ /*针对标题*/ /*column-span:1/all 独占一行*/ column-span:all; } </style> </head> <body> <div> <h1>中国人民最努力</h1> <p>善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良,勤劳善良</p> </div> </body> </html>
    Processed: 0.015, SQL: 8