专注前端素材!
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>素材8网教程(study.sucai8.cn)</title> <style> div { text-align:justify; text-justify:inter-word; } </style> </head> <body> <h1>CSS text-justify实例</h1> <div>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.'</div> <p><b>提示:</b> 调整浏览器窗口的大小, 以查看“text-justify”如何工作</p> <p><b>注意:</b>text-justify 只兼容IE浏览器.</p> </body> </html>
运行结果