何为杂记,杂记就是我随便写写的,平时看到觉得有用的就记下来

       1、text-overflow     clip | ellipsis 

            当文本溢出时是否显示“...”  此属性必须是overflow:hidden下才能使用

            clip:不显示省略标记(...),而是简单的裁切
            ellipsis  :当对象内文本溢出时显示省略标记(...)
 

   

ellipsis代码

<div style=" width:50px; background-color:Silver; text-overflow:ellipsis; overflow:hidden ">
123456789
</div>

 效果:

123456789

 

新发现两则:

         一、中文无效         

<div style=" width:50px; background-color:Silver; text-overflow:ellipsis; overflow:hidden ">
中文是无效的,不知道为什么
</div>

 

       效果图      

中文是无效的,不知道为什么

         二、对于inline 对象 会忽视  width属性被忽略

<label style=" width:50px; background-color:Red">设置了width无效的,无标题页设置</label>

 

             效果图:    

如果碰到不能正常显示只要加一个display:block 这样就可以视为块级元素了

  效果图

       2、clear  该属性的值指出了不允许有浮动对象的边

       

CSS杂记(一)
该属性的值指出了不允许有浮动对象的边。请参阅float属性。 对应的脚本特性为clear。

相关文章:

  • 2021-06-04
  • 2022-12-23
  • 2021-11-26
  • 2021-07-30
  • 2021-08-29
  • 2022-02-28
猜你喜欢
  • 2021-10-28
  • 2021-07-28
  • 2022-12-23
  • 2021-05-26
  • 2022-12-23
  • 2021-07-23
  • 2021-05-17
相关资源
相似解决方案