获取计算后的css样式

来源:互联网 发布:c语言 log 编辑:程序博客网 时间:2024/05/22 08:03

width:100%;

word-break:keep-all;/* 不换行 */

white-space:nowrap;/* 不换行 */

overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */

text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/


本篇文章来源于站长圈 原文链接:http://www.52jscn.com/web/2013/12/7603.shtml

 

 

 function getCurrentStyle(node){
      var style = null;
      if(window.getComputedStyle){
       style = window.getComputedStyle(node,null);
      }else{
       style = node.currentStyle;
      }
      return style;
   }

0 0
原创粉丝点击