>웹 프론트엔드 >HTML 튜토리얼 >多列 - HappyForEverIsaDream

多列 - HappyForEverIsaDream

WBOY
WBOY원래의
2016-05-21 08:42:221448검색
<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

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.