注意:1、CSS中的float属性是个例外,因为float是javascript的保留关键字,在IE中使用的是styleFloat,而其他浏览器则使用cssFloat。

盒子标签和属性对照

CSS语法(不区分大小写)

JavaScript语法(区分大小写)

border

border

border-bottom

borderBottom

border-bottom-color

borderBottomColor

border-bottom-style

borderBottomStyle

border-bottom-width

borderBottomWidth

border-color

borderColor

border-left

borderLeft

border-left-color

borderLeftColor

border-left-style

borderLeftStyle

border-left-width

borderLeftWidth

border-right

borderRight

border-right-color

borderRightColor

border-right-style

borderRightStyle

border-right-width

borderRightWidth

border-style

borderStyle

border-top

borderTop

border-top-color

borderTopColor

border-top-style

borderTopStyle

border-top-width

borderTopWidth

border-width

borderWidth

clear

clear

float

styleFloat / cssFloat

margin

margin

margin-bottom

marginBottom

margin-left

marginLeft

margin-right

marginRight

margin-top

marginTop

padding

padding

padding-bottom

paddingBottom

padding-left

paddingLeft

padding-right

paddingRight

padding-top

paddingTop

颜色和背景标签和属性对照

CSS 语法(不区分大小写)

JavaScript 语法(区分大小写)

background

background

background-attachment

backgroundAttachment

background-color

backgroundColor

background-image

backgroundImage

background-position

backgroundPosition

background-repeat

backgroundRepeat

color

color

样式标签和属性对照

CSS语法(不区分大小写)

JavaScript 语法(区分大小写)

display

display

list-style-type

listStyleType

list-style-image

listStyleImage

list-style-position

listStylePosition

list-style

listStyle

white-space

whiteSpace

文字样式标签和属性对照

CSS 语法(不区分大小写)

JavaScript 语法(区分大小写)

font

font

font-family

fontFamily

font-size

fontSize

font-style

fontStyle

font-variant

fontVariant

font-weight

fontWeight

文本标签和属性对照

CSS 语法(不区分大小写)

JavaScript 语法(区分大小写)

letter-spacing

letterSpacing

line-break

lineBreak

line-height

lineHeight

text-align

textAlign

text-decoration

textDecoration

text-indent

textIndent

text-justify

textJustify

text-transform

textTransform

vertical-align

verticalAlign

html中td.class="aaa"

td.className="aaa"

webkit内核部分新增

CSS3

JavaScript 语法(区分大小写)

box-shadow

elemmnt.style.webkitBoxShadow

transform

elemmnt.style.webkitTransform

transform:translate

elemmnt.style.webkitTransform = “translate(px,px)”;

transform:scale

elemmnt.style.webkitTransform = “scale(x,y)”;

transform:rotate

elemmnt.style.webkitTransform = “rotate(deg)”;

transform:skew

elemmnt.style.webkitTransform = “skew(deg)”;

transform-origin

elemmnt.style.webkitTransformOrigin

transform-style

elemmnt.style.webkitTransformStyle

transition-property

elemmnt.style.webkitTransformProperty

transition-duration

elemmnt.style.webkitTransitionDuration

transition-timing-function

elemmnt.style.webkitTransitionTimingFunction

transition-delay

elemmnt.style.webkitTransitionDelay

animation-name

elemmnt.style.webkitAnimationName

animation-duration

elemmnt.style.webkitAnimationDuration

animation-timing-function

elemmnt.style.webkitAnimationTimingFunction

animation-iteration-count

elemmnt.style.webkitAnimationIterationCount

animation-direction

elemmnt.style.webkitAnimationDirection

animation-play-state

elemmnt.style.webkitAnimationPlayState

animation-delay

elemmnt.style.webkitAnimationDelay

background linear-gradient

elemmnt.style.background = “-webkit-gradient(linear, ~~)”;

background radial-gradient

elemmnt.style.background = “-webkit-gradient(radial, ~~)”;

text-shadow

elemmnt.style.textShadow

box-sizing

elemmnt.style.webkitBoxSizing

border-radius

elemmnt.style.webkitBorderRadius

border-top-left-radius

elemmnt.style.webkitBorderTopLeftRadius

border-top-right-radius

elemmnt.style.webkitBorderTopRightRadius

border-bottom-left-radius

elemmnt.style.webkitBorderBottomLeftRadius

border-bottom-right-radius

elemmnt.style.webkitBorderBottomRightRadius

border-image

elemmnt.style.webkitBorderImage

border-image-source

elemmnt.style.webkitBorderImageSource

border-image-slice

elemmnt.style.webkitBorderImageSlice

border-image-width

elemmnt.style.webkitBorderImageWidth

border-image-outset

elemmnt.style.webkitBorderImageOutset

border-image-repeat

elemmnt.style.webkitBorderImageRepeat

CSS和JS样式属性对照表的更多相关文章

  1. CSS和Js样式属性的对照关系

    注意:1.在使用js时,如newTD.style.paddingLeft="200";(错误),正确生效的写法是newTD.style.paddingLeft="200p ...

  2. IT兄弟连 HTML5教程 CSS3揭秘 CSS常见的样式属性和值1

    CSS中的样式属性比较多,经常使用的属性可以分为这么几类:字体.文本.背景.位置.边框.列表,以及其他一些样式属性.每个类中的属性都可以单独使用:如果同一个类中多个属性一起使用,还可以将它们整合为一行 ...

  3. CSS控制列表样式属性list-style有哪些?怎么用?

    CSS列表样式属性list-style有哪些类型?不同类型CSS控制列表样式使用时该注意什么? 这是W3Cschool用户Shirley于2016-11-10在W3Cschool编程问答提出的问题.云 ...

  4. SpringMVC配置了拦截器(interceptors)却显示不出css、js样式的解决办法

    首先因为在web.xml里面配置了 <filter-mapping> <filter-name>characterEncodingFilter</filter-name& ...

  5. IT兄弟连 HTML5教程 CSS3揭秘 CSS常见的样式属性和值4

    6  鼠标光标属性 在网页中默认的鼠标指针只有两种,一种是最普通的箭头,另一种是当移动到链接上时出现的“小手”.但现在越来越多的网页都使用了CSS鼠标指针技术,当将鼠标移动到链接上时,可以看到多种不同 ...

  6. 今天写了一个SSM小项目,运行之后,前端页面的CSS、js样式显示不出来,具体操作如下:

    因为SSM中我们设置了拦截器,拦截器会拦截CSS和JS,所有样式渲染不出来,在Web.xml中写上 1 <servlet-mapping> 2 <servlet-name>de ...

  7. HTML、CSS、JS 样式 (未整理)

    随手记,有错误的地方希望留言 ^.-.^ PHP 实现关闭浏览器窗口echo "<script>window.close();</script>"; jqu ...

  8. iOS实现 webView loadHTMLString加载外部css、js样式

    记录一下. webview(或wk)用 loadHTMLString加载内容时 ,如果只是单纯的html内容,样式等都写在内部,直接设置baseURL为nil即可. 不过当html里包含外部样式或调用 ...

  9. IT兄弟连 HTML5教程 CSS3揭秘 CSS常见的样式属性和值3

    5  边框属性 边框属性用于设置一个元素的边框风格.边框宽度.边框颜色,可以一起设置4条边的边框,也可对上边框.右边框.下边框和左边框单独设置.分别介绍如下. a.边框风格属性 可以通过边框风格属性b ...

随机推荐

  1. 【HTML】Intermediate6:Text: Addresses, Definitions, Bi-directional, and Editorial

    1.</address> It should be used specifically for the contact details relating either to the ent ...

  2. 搭建Windows Azure开发环境-环境搭建

    虚拟机中运行 练习1:使用远程桌面连接到虚拟机 在本节中,你会登录到Windows Azure的门户网站,并使用Windows Azure库创建的Azure虚拟机. 任务1 -配置的Visual St ...

  3. MVC 5 第三章 HTML Helper

    提及到HTML helper大家肯定不应该陌生, 因为在书写MVC View的时候肯定需要使用到它.一个HTML Help就是一个返回HTML字符串的方法,这个字符串表示你所期望的类型的内容.例如,你 ...

  4. 【Java基础】Java中的代码块

    什么是代码块 在Java中,用{}括起来的代码称之为代码块. 代码块分类 局部代码块:在局部变量位置且用{}括起来的代码,用于限制局部变量的生命周期. 构造代码块:在类中的成员变量位置并用{}括起来的 ...

  5. c c++ 函数入口和出口的hook(gcc 编译选项),然后打印出函数调用关系的方法

    GCC Function instrumentation机制可以用来跟踪函数的调用关系,在gcc中对应的选项为“-finstrument-functions”.可查看gcc的man page来获取更详 ...

  6. 【python自动化第十篇:】

    复习: 线程与进程的区别: 进程:资源的集合 线程:最小调度单位 进程至少包含一个线程 线程之间的内存是共享的,两个线程操作同一个数据就会修改整个结果(需要mutex加锁来保持数据的一致性),递归锁, ...

  7. uva 1422 - Processor(二分+优先队列)

    题目链接:uva 1422 - Processor 题目大意:有一个机器要处理一些问题,给出这些问题可以开始的时间和必须完成的时间,以及任务的工作量,问说机器必须以最少每秒多少得工作量才能完成这些任务 ...

  8. Oracle学习过程(随时更新)

    1.入门 实用的一些查询语句: 查询用户所有表注释 select * from user_tab_comments 条件查询 根据两个值查询 select*from table where 字段 in ...

  9. 一个tomcat究竟能接受多少并发

    maxThreads 对tomcat来说,每一个进来的请求(request)都需要一个线程,直到该请求结束.如果同时进来的请求多于当前可用的请求处理线程数,额外的线程就会被创建,直到到达配置的最大线程 ...

  10. HDU 2517 棋盘分割

    题意:n刀切割棋盘 下面是8*8的棋盘,每个数字代表棋盘对应点的权值,问切割n刀后,每一块的和  的均方差最小是多少 均方差的公式需要先化简: 由上式得,均方差最小 显然是要 Xi^2 最小 d[k] ...