源代碼
點擊運行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>教程</title> <style> img.normal { height:auto; } img.big { height:120px; } p.ex { height:100px; width:100px; } </style> </head> <body> <img class="normal" src="/images/logo.png" width="95" height="84" /><br> <img class="big" src="/images/logo.png" width="95" height="84" /> <p class="ex">這個段落的高和寬是 100px.</p> <p>這是段落中的一些文本。這是段落中的一些文本。 這是段落中的一些文本。這是段落中的一些文本。 這是段落中的一些文本。這是段落中的一些文本.</p> </body> </html>
運行結果