CSS 將所有元素皆視為一個區塊,由內容 (Content)、內邊距 (Padding)、邊框 (Border)、外邊距 (Margin) 所組成,如下圖所示:
Copyright © 2011 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
<!-- 範例: --> <!DOCTYPE html> <html> <head> <style> i { background-color: #F60; padding: 10px; border: 5px #69F solid; margin: 20px; } </style> </head> <body> <p>Example</p> <br> <i>Example</i> </body> </html>