CSS和JS标签style属性对照表

来源:互联网 发布:淘宝开店托管充值软件 编辑:程序博客网 时间:2024/05/28 05:15

  

盒子标签和属性对照CSS语法(不区分大小写)    JavaScript语法(区分大小写)border    borderborder-bottom    borderBottomborder-bottom-color    borderBottomColorborder-bottom-style    borderBottomStyleborder-bottom-width    borderBottomWidthborder-color    borderColorborder-left    borderLeftborder-left-color    borderLeftColorborder-left-style    borderLeftStyleborder-left-width    borderLeftWidthborder-right    borderRightborder-right-color    borderRightColorborder-right-style    borderRightStyleborder-right-width    borderRightWidthborder-style    borderStyleborder-top    borderTopborder-top-color    borderTopColorborder-top-style    borderTopStyleborder-top-width    borderTopWidthborder-width    borderWidthclear    clearfloat    floatStylemargin    marginmargin-bottom    marginBottommargin-left    marginLeftmargin-right    marginRightmargin-top    marginToppadding    paddingpadding-bottom    paddingBottompadding-left    paddingLeftpadding-right    paddingRightpadding-top    paddingTop颜色和背景标签和属性对照CSS 语法(不区分大小写)    JavaScript 语法(区分大小写)background    backgroundbackground-attachment    backgroundAttachmentbackground-color    backgroundColorbackground-image    backgroundImagebackground-position    backgroundPositionbackground-repeat    backgroundRepeatcolor    color样式标签和属性对照CSS语法(不区分大小写)    JavaScript 语法(区分大小写)display    displaylist-style-type    listStyleTypelist-style-image    listStyleImagelist-style-position    listStylePositionlist-style    listStylewhite-space    whiteSpace文字样式标签和属性对照CSS 语法(不区分大小写)    JavaScript 语法(区分大小写)font    fontfont-family    fontFamilyfont-size    fontSizefont-style    fontStylefont-variant    fontVariantfont-weight    fontWeight文本标签和属性对照CSS 语法(不区分大小写)    JavaScript 语法(区分大小写)letter-spacing    letterSpacingline-break    lineBreakline-height    lineHeighttext-align    textAligntext-decoration    textDecorationtext-indent    textIndenttext-justify    textJustifytext-transform    textTransformvertical-align    verticalAlignhtml中td.class="aaa"    td.className="aaa"

注意:1、在使用js时,如newTD.style.paddingLeft="200";(错误),正确生效的写法是newTD.style.paddingLeft="200px";(正确),不可少了px,否则不会生效。


转载自:http://www.9958.pw/post/css_js_style

0 0