(编辑:jimmy 日期: 2024/10/31 浏览:2)
本文实例讲述了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网页设计有所帮助。