编辑下面的代码:【加编码】
<html> <head> <style> h1 {text-align:center;} p.date {text-align:right;} p.main {text-align:justify;} </style> </head> <body> <h1>CSS text-align Example</h1> <p class="date">May, 2009</p> <p class="main">In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since. 'Whenever you feel like criticizing anyone,' he told me, 'just remember that all the people in this world haven't had the advantages that you've had.'</p> <p><b>Note:</b> Resize the browser window to see how the value "justify" works.</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂