阅读背景:

html+css 文本长度过长省略号显示

来源:互联网 
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ellipsis</title>
</head>
<body>
    <script type="text/javascript">
            //
    </script>
    <style>
        .demo {display: inline-block;*display: inline;*zoom: 1;width: 140px;height: 20px;line-height: 20px;font-size: 12px;overflow: hidden;-ms-text-overflow: ellipsis;text-overflow: ellipsis;white-space: nowrap;}
        .demo:hover {height: auto;white-space: normal;}
    </style>
<b  class="demo">测试用的文本,没有实际意义,只是想达到显示效果。测试用的文本,没有实际意义,只是想达到显示效果。测试用的文本,没有实际意义,只是想达到显示效果。测试用的文本,没有实际意义,只是想达到显示效果。</b>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
   



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: