首页 > Web开发 > 详细

CSS强制换行对齐的实现方法

时间:2016-02-08 16:20:43      阅读:277      评论:0      收藏:0      [点我收藏+]

本文实例讲述了CSS强制换行对齐的实现方法。分享给大家供大家参考。具体分析如下:

用CSS控制中英文字符强制换行并两端对齐,有效避免DIV的内容超出范围而改变网页布局,强制换行的功能很实用。


复制代码
代码如下:

<html>
<head>
<title>CSS强制换行对齐</title>
</head>
<body>
英文对齐:
<div style="font-size:12px;width:300;text-align:justify;text-justify:newspaper">If you are Male, between 20 to 40 years old, ethnically Chinese and effectively bilingual (English/Mandarin) with a minimum university degree, this is your opportunity of a lifetime. You need to have confidence and charisma in front of the camera and possess good scriptwriting ability in English. Some Media experience preferred</div>
中文对齐:
<div style="font-size:12px;width:300;text-align:justify; text-justify:inter-ideograph">
一款灰色风格超实用漂亮网页日历组件,在保证外观的基础上,本插件更注重功能的体验,操作很舒服,想使用网页日期选择器的朋友,本款是您不错的选择。。</div>
</body>
</html>

希望本文所述对大家的div+css网页设计有所帮助。

CSS强制换行对齐的实现方法

原文:http://www.jb51.net/css/325109.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!