Chinaunix首页 | 论坛 | 博客
  • 博客访问: 23155
  • 博文数量: 9
  • 博客积分: 375
  • 博客等级: 一等列兵
  • 技术积分: 110
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-21 15:27
文章分类
文章存档

2011年(1)

2010年(1)

2008年(7)

我的朋友
最近访客

分类: Java

2008-06-05 20:31:03

  13框js类菜单
 
js操作css,obj.style.margin,obj.style.width,obj.style.left,obj.style.position
有-的去掉再把-后面的首字母大写就可以了。
1、对于没有中划线的css属性一般直接使用style.属性名即可。
如:obj.style.margin,obj.style.width,obj.style.left,obj.style.position等。
2、对于含有中划线的css属性,将每个中划线去掉并将每个中划线后的第一个字符换成大写即可。
如:obj.style.marginTop,obj.style.borderLeftWidth,obj.style.zIndex,obj.style.fontFamily等。
3、在css中有一个特殊的属性其js使用方法确比较特殊。
这个特殊的属性就是:float。我们不能直接使用obj.style.float来使用,这样操作是无效的。
其正确的使用方法是为:IE:obj.style.styleFloat,其他浏览器:obj.style.cssFloat。
4.给属性附值字符串家“"”
阅读(537) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:responseXML.xml不能显示问题

给主人留下些什么吧!~~