源代碼
點擊運行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>教程</title> <style> p.ex1 {padding:2cm;} p.ex2 {padding:0.5cm 3cm;} </style> </head> <body> <p class="ex1">這個文本兩邊的填充邊距一樣。每邊的填充邊距為2厘米。</p> <p class="ex2">這個文本的頂部和底部填充邊距都為0.5厘米,左右的填充邊距為3厘米。</p> </body> </html>
運行結果