• 两种方法实现超出省略号效果


    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
  • 相关阅读:
    matrix_2015_1 138
    2014ACM/ICPC亚洲区广州站 北大命题
    无向图的联通分量
    5.1 基础题目选讲
    URAL
    Codeforces Round #274 (Div. 2)
    后缀数组
    poj 1661 help jimmy dp
    hdu 1676 Full Tank? 限制最短路 dp 蛮有技巧的~
    hdu 1023 Train Problem II 双向广搜
  • 原文地址:https://www.cnblogs.com/wangbin/p/1708427.html
Copyright © 2020-2023  润新知