作者:捕鱼达人2602881157 | 来源:互联网 | 2020-08-30 20:04
text-overflow属性用于指定当文本溢出包含它的元素时,应该发生的事情。
CSS3 text-overflow属性
作用:text-overflow 属性规定当文本溢出包含元素时发生的事情。
语法:
text-overflow: clip|ellipsis|string;
clip:修剪文本。
ellipsis:显示省略符号来代表被修剪的文本。
string:使用给定的字符串来代表被修剪的文本。
注:所有主流浏览器都支持 text-overflow 属性。
CSS3 text-overflow属性的使用示例
将鼠标移动到框内,查看效果.
This is some long text that will not fit in the box
This is some long text that will not fit in the box
效果图:
本文参考:https://www.html.cn/book/css/properties/user-interface/text-overflow.htm
以上就是text-overflow属性怎么用的详细内容,更多请关注 第一PHP社区 其它相关文章!