js语法和css语法的对比
2016-06-27来源:易贤网

方法:

document.getelementbyid(xx).style.xxx中的所有属性是什么

盒子标签和属性对照

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 floatstyle

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

推荐信息