zoukankan      html  css  js  c++  java
  • 两种方法实现超出省略号效果

    woaicss woaicss woaicsswoaicsswoaicsswoaicss 
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    2  <html xmlns="http://www.w3.org/1999/xhtml">
    3  <head>
    4  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    5 <title>JS test</title>
    6 <style type="text/css">
    7 *{
    8 margin:0;
    9 padding:0;
    10 }
    11 body{
    12 padding:10px;
    13 font-family:Arial;
    14 }
    15 #ididid{
    16 position:relative;
    17 width:150px;
    18 height:20px;
    19 line-height:20px;
    20 text-overflow:ellipsis;
    21 white-space:normal;
    22 *white-space:nowrap;
    23 overflow:hidden;
    24 border:1px solid #999;
    25 }
    26 #ididid span{
    27 position:absolute;
    28 top:0;
    29 right:0;
    30 display:block;
    31 float:left;
    32 }
    33 #ididid span:after{content:"...";}
    34 </style>
    35 </head>
    36 <body>
    37 <div id="ididid">woaicss woaicss woaicsswoaicsswoaicsswoaicss<span></span></div>
    38 </body>
    39 </html>
    aliyun活动 https://www.aliyun.com/acts/limit-buy?userCode=re2o7acl
  • 相关阅读:
    ngx_lua_waf
    一致性hash算法
    BloomFilter理解
    SkipList理解
    es中的一些知识点记录
    普通类、抽象类和接口区别:
    spring中的事件 applicationevent 讲的确实不错(转)
    CMS和G1的区别,以及Parallel
    SpringBoot优化内嵌的Tomcat ---设置MaxConnections
    tomcat启动nio,apr详解以及配置
  • 原文地址:https://www.cnblogs.com/wangbin/p/1708427.html
Copyright © 2011-2022 走看看