源代碼
點擊運行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>教程</title> <style> div { font-size: 30px; border: 1px solid black; } span { font-size: 1ex; } </style> </head> <body> <div>div 的 font-size 設置為 20px。 <span>div 中的 span 元素 font-size 為 1ex</span>。</div> </body> </html>
運行結果