zoukankan      html  css  js  c++  java
  • CSS多行文字超出隐藏加省略号



    <!DOCTYPE html>
    <html >
    <head>
    <meta charset="UTF-8">   
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>  
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />       
    <title>CSS多行文字超出隐藏加省略号</title>
    <style type="text/css">
    html {height: 100%;}
    body { 200px;height: 100%;position: relative;padding: 0;margin: 0;}
    .m-super-msg-text{display: -webkit-box;max-height: 54px;line-height: 18px; font-size: 12px;text-align:justify;color: #838791;letter-spacing: 0;overflow: hidden;text-overflow: ellipsis;-webkit-line-clamp: 3;-webkit-box-orient: vertical;word-break: break-all;}
    </style>
    </head>
    <body>
    <div class="m-super-msg-text">
    超级大礼包,内含所有商品,半价优惠,经济实惠!超级大礼包,内含所有商品,半价优惠,经济实惠!超级大礼包,内含所有商品,半价优惠,经济实惠!
    </div>
    <script src="https://cdn.bootcss.com/jquery/1.9.0/jquery.js"></script>
    <script>
    </script>
    </body>
    </html>

  • 相关阅读:
    第三次作业
    第二次作业
    第一次作业
    软件工程第0次作业
    第四次作业
    第三次作业
    第二次作业
    第一次作业
    第零次作业
    第四次软件工程作业
  • 原文地址:https://www.cnblogs.com/xutongbao/p/9924846.html
Copyright © 2011-2022 走看看