1. 带各种漂亮颜色边框的 DIV,请看下面的效果:

2. Span 中的内容超过长度自动隐藏

   

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style type="text/css">
        .fl { float:left;  }
        .w_50 { width:50px; }
        .t_elli{ text-overflow:ellipsis; white-space:nowrap; word-wrap:normal; overflow:hidden; }
    </style>
</head>
<body>
<!-- Span 中的内容超过长度自动隐藏 -->
<div>
    <span class="fl w_50 t_elli">Hello World</span>
</div>    
</body>
</html>

 

3.

谢谢浏览!

相关文章:

  • 2021-07-19
  • 2021-07-04
  • 2022-01-26
  • 2021-05-21
  • 2021-05-27
  • 2022-01-18
  • 2021-04-03
  • 2021-04-12
猜你喜欢
  • 2021-12-04
  • 2021-10-19
  • 2021-05-31
  • 2021-07-01
  • 2021-09-03
  • 2022-02-20
相关资源
相似解决方案