首頁 > web前端 > html教學 > 多列 - HappyForEverIsaDream

多列 - HappyForEverIsaDream

WBOY
發布: 2016-05-21 08:42:22
原創
1464 人瀏覽過
<span style="color: #008080;">1</span> <span style="color: #800000;">.newspaper
</span><span style="color: #008080;">2</span> {
<span style="color: #008080;">3</span> <span style="color: #ff0000;">-moz-column-count</span>:<span style="color: #0000ff;">3</span>; <span style="color: #008000;">/*</span><span style="color: #008000;"> Firefox </span><span style="color: #008000;">*/</span>
<span style="color: #008080;">4</span> <span style="color: #ff0000;">-webkit-column-count</span>:<span style="color: #0000ff;">3</span>; <span style="color: #008000;">/*</span><span style="color: #008000;"> Safari and Chrome </span><span style="color: #008000;">*/</span>
<span style="color: #008080;">5</span> <span style="color: #ff0000;">column-count</span>:<span style="color: #0000ff;">3</span>;
<span style="color: #008080;">6</span> }
<span style="color: #008080;">7</span> <span style="color: #800000;">在当前div的宽度中,将内容分为3列显示</span>
登入後複製
View Code
<span style="color: #008080;"> 1</span> <span style="color: #800000;">.newspaper
</span><span style="color: #008080;"> 2</span> {
<span style="color: #008080;"> 3</span> <span style="color: #ff0000;">-moz-column-count</span>:<span style="color: #0000ff;">3</span>; <span style="color: #008000;">/*</span><span style="color: #008000;"> Firefox </span><span style="color: #008000;">*/</span>
<span style="color: #008080;"> 4</span> <span style="color: #ff0000;">-webkit-column-count</span>:<span style="color: #0000ff;">3</span>; <span style="color: #008000;">/*</span><span style="color: #008000;"> Safari and Chrome </span><span style="color: #008000;">*/</span>
<span style="color: #008080;"> 5</span> <span style="color: #ff0000;">column-count</span>:<span style="color: #0000ff;">3</span>;
<span style="color: #008080;"> 6</span> 
<span style="color: #008080;"> 7</span> <span style="color: #ff0000;">-moz-column-gap</span>:<span style="color: #0000ff;">30px</span>; <span style="color: #008000;">/*</span><span style="color: #008000;"> Firefox </span><span style="color: #008000;">*/</span>
<span style="color: #008080;"> 8</span> <span style="color: #ff0000;">-webkit-column-gap</span>:<span style="color: #0000ff;">30px</span>; <span style="color: #008000;">/*</span><span style="color: #008000;"> Safari and Chrome </span><span style="color: #008000;">*/</span>
<span style="color: #008080;"> 9</span> <span style="color: #ff0000;">column-gap</span>:<span style="color: #0000ff;">30px</span>;
<span style="color: #008080;">10</span> }
<span style="color: #008080;">11</span> <span style="color: #800000;">当前div 中内容分为三列显示,列之间的距离是30px.</span>
登入後複製
View Code
<span style="color: #008080;"> 1</span> <span style="color: #800000;">.newspaper
</span><span style="color: #008080;"> 2</span> {
<span style="color: #008080;"> 3</span> <span style="color: #ff0000;">-moz-column-count</span>:<span style="color: #0000ff;">3</span>; <span style="color: #008000;">/*</span><span style="color: #008000;"> Firefox </span><span style="color: #008000;">*/</span>
<span style="color: #008080;"> 4</span> <span style="color: #ff0000;">-webkit-column-count</span>:<span style="color: #0000ff;">3</span>; <span style="color: #008000;">/*</span><span style="color: #008000;"> Safari and Chrome </span><span style="color: #008000;">*/</span>
<span style="color: #008080;"> 5</span> <span style="color: #ff0000;">column-count</span>:<span style="color: #0000ff;">3</span>;
<span style="color: #008080;"> 6</span> 
<span style="color: #008080;"> 7</span> <span style="color: #ff0000;">-moz-column-gap</span>:<span style="color: #0000ff;">40px</span>; <span style="color: #008000;">/*</span><span style="color: #008000;"> Firefox </span><span style="color: #008000;">*/</span>
<span style="color: #008080;"> 8</span> <span style="color: #ff0000;">-webkit-column-gap</span>:<span style="color: #0000ff;">40px</span>; <span style="color: #008000;">/*</span><span style="color: #008000;"> Safari and Chrome </span><span style="color: #008000;">*/</span>
<span style="color: #008080;"> 9</span> <span style="color: #ff0000;">column-gap</span>:<span style="color: #0000ff;">40px</span>;
<span style="color: #008080;">10</span> 
<span style="color: #008080;">11</span> <span style="color: #ff0000;">-moz-column-rule</span>:<span style="color: #0000ff;">4px outset #ff0000</span>; <span style="color: #008000;">/*</span><span style="color: #008000;"> Firefox </span><span style="color: #008000;">*/</span>
<span style="color: #008080;">12</span> <span style="color: #ff0000;">-webkit-column-rule</span>:<span style="color: #0000ff;">4px outset #ff0000</span>; <span style="color: #008000;">/*</span><span style="color: #008000;"> Safari and Chrome </span><span style="color: #008000;">*/</span>
<span style="color: #008080;">13</span> <span style="color: #ff0000;">column-rule</span>:<span style="color: #0000ff;">4px outset #ff0000</span>;
<span style="color: #008080;">14</span> }
登入後複製
View Code

來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板