溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

CSS如何實現(xiàn)強制換行對齊

發(fā)布時間:2022-03-05 10:13:43 來源:億速云 閱讀:489 作者:小新 欄目:web開發(fā)

這篇文章主要介紹CSS如何實現(xiàn)強制換行對齊,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!

用CSS控制中英文字符強制換行并兩端對齊,有效避免DIV的內(nèi)容超出范圍而改變網(wǎng)頁布局,強制換行的功能很實用。

代碼如下:


<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"> 
一款灰色風格超實用漂亮網(wǎng)頁日歷組件,在保證外觀的基礎上,本插件更注重功能的體驗,操作很舒服,想使用網(wǎng)頁日期選擇器的朋友,本款是您不錯的選擇。。</div>
</body>
</html>

以上是“CSS如何實現(xiàn)強制換行對齊”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關知識,歡迎關注億速云行業(yè)資訊頻道!

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。

css
AI