亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

text-overflow 與 word-wrap

text-overflow is used to set whether to use an omission mark (...) to mark the overflow of text within the object.

Grammar:

QQ截圖20161014170051.png


But text-overflow is only used to explain how to display text when it overflows. To achieve To produce the effect of ellipses when overflowing, you must also define the forced text to be displayed in one line (white-space:nowrap) and the overflow content to be hidden (overflow:hidden). Only in this way can the effect of displaying ellipses in overflow text be achieved. The code is as follows:

text-overflow:ellipsis; 
overflow:hidden; 
white-space:nowrap;

At the same time, word-wrap can also be used to set the text behavior, whether to break the line when the current line exceeds the boundary of the specified container.

Syntax:

QQ截圖20161014170100.png


normal is the browser default value, break-word is set inside a long word or URL address Perform line breaks. This attribute is not commonly used. Just use the browser default value.


Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>text-overflow</title> <style type="text/css"> .test_demo{ text-overflow:ellipsis; overflow:hidden; white-space:nowrap; width:200px; background:#ccc; } </style> </head> <body> <div class="test_demo"> 超酷的IT技術(shù)學(xué)習(xí)平臺(tái)(我是省略號(hào)) </div> </body> </html>
submitReset Code