[英]CSS: Insert a Newline After a Text Character
如何僅使用CSS在此代碼的第一個句點之后插入換行符?
<footer>©2004-2015 Delta Systems, Inc. All Rights Reserved.</footer>
我知道在元素后插入換行符是這樣的:
h4 { display: inline; float: none; }
h4:after { content: "\a"; white-space: pre; }
但是在選擇了特定字符之后是否可以這樣做?
您可以嘗試像這樣使用自動換行和寬度。
HTML:
<footer>©2004-2015 Delta Systems, Inc. All Rights Reserved.</footer>
CSS:
footer {
width: 220px;
word-wrap: break-word
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.