justify值设置文本拉伸对齐
实例代码:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
div{
border:1px solid;
padding:5px;
width:200px;
text-align:justify;
}
</style>
</head>
<body>
<h1>设置文本拉伸对齐</h1>
<p>text-align:justify;值会拉伸线条,使每条线都有相等的宽度(比如报纸和杂志)
</p>
<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>
</body>
</html>
运行效果:
评论