JS可以控制樣式的名稱寫法一覽
CSS語法 (不區(qū)分大小寫) JavaScript語法 (區(qū)分大小寫)
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語法 (不區(qū)分大小寫) JavaScript語法 (區(qū)分大小寫)
background background
background-attachment backgroundAttachment
background-color backgroundColor
background-image backgroundImage
background-position backgroundPosition
background-repeat backgroundRepeat
color color
樣式標簽和屬性對照
CSS語法 (不區(qū)分大小寫) JavaScript語法 (區(qū)分大小寫)
display display
list-style-type listStyleType
list-style-image listStyleImage
list-style-position listStylePosition
list-style listStyle
white-space whiteSpace
文字樣式標簽和屬性對照
CSS語法 (不區(qū)分大小寫) JavaScript語法 (區(qū)分大小寫)
font font
font-family fontFamily
font-size fontSize
font-style fontStyle
font-variant fontVariant
font-weight fontWeight
文本標簽和屬性對照
CSS語法 (不區(qū)分大小寫) JavaScript語法 (區(qū)分大小寫)
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
相關文章
跟我學習javascript的prototype原型和原型鏈
跟我學習javascript的prototype原型和原型鏈,感興趣的小伙伴們可以參考一下2015-11-11js+canvas實現圖片格式webp/png/jpeg在線轉換
這篇文章主要介紹了js+canvas實現圖片格式webp/png/jpeg在線轉換,需要的朋友可以參考下2020-08-08JavaScript實現點擊復制功能具體代碼(JS訪問剪貼板相關)
這篇文章主要給大家介紹了關于JavaScript實現點擊復制功能(JS訪問剪貼板相關)的相關資料,復制功能指的是將一個文本或者圖片等資源從一個位置通過復制的方式再次拷貝到另一個位置,需要的朋友可以參考下2023-10-10