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
  • 相关阅读:
    牛客小白月赛4-E-浮点数输出 字符串
    HDU 5319 Painter(模拟)
    AtCoder Regular Contest 098 D
    strchr函数的用法
    fgets()
    格式
    Uncaught TypeError: Cannot read property 'addEventListener' of null
    window cmd下常用操作
    nuxt导入css样式
    ERROR EPERM: operation not permitted, mkdir 'C:UsersAdministratorDesktop ext uxtasic.nuxtcomponents'
  • 原文地址:https://www.cnblogs.com/wangbin/p/1708427.html
Copyright © 2011-2022 走看看