以下五個技巧涵蓋文章排版中最常見的需求。
可用 text-indent: 2em; 讓段落首行縮排兩個字。
text-indent: 2em;
圖片加上 float: left; 與 margin-right: 15px;,可讓文字環繞圖片。
float: left;
margin-right: 15px;
可用 background: #faf7e8; 為引用或重點區塊加上底色。
background: #faf7e8;
使用 text-align: center; 可讓文字水平居中。
text-align: center;
使用 border: 1px dotted #080; 可加入虛線邊框,常見樣式有 solid、dashed、dotted。
border: 1px dotted #080;