CSSºÍJS±êÇ©styleÊôÐÔ¶ÔÕÕ±í
ºÐ×Ó±êÇ©ºÍÊôÐÔ¶ÔÕÕ
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
Ïà¹ØÎĵµ£º
CSS important
.dialog{margin:4px !important;margin:1px;} /* IEÒÔ×îºó³öÏÖµÄΪ׼, Firefox|Opera|SafariÒÔ!importantΪ׼ */
CSS DIV°ë͸Ã÷
filter: alpha(opacity=50); /*IEÖ§³Ö(·¶Î§0-100)*/
opacity: 0.50; /*·ÇIEÖ§³Ö(·¶Î§0-1)*/
......
CSS±³¾°ÊôÐÔ
±³¾°ÑÕÉ«ÊôÐÔ(background-color)
Õâ¸öÊôÐÔΪHTMLÔªËØÉ趨±³¾°ÑÕÉ«£¬Ï൱ÓÚHTMLÖÐbgcolorÊôÐÔ¡£
body {background ......
Block element ¿é¼¶ÔªËØ
¹ËÃû˼Òå¾ÍÊÇÒÔ¿éÏÔʾµÄÔªËØ£¬¸ß¶È¿í¶È¶¼ÊÇ¿ÉÒÔÉèÖõġ£±ÈÈçÎÒÃdz£ÓõÄ<div>¡¢<p>¡¢<ul>ĬÈÏ״̬϶¼ÊÇÊôÓÚ¿é¼¶ÔªËØ¡£¿é¼¶ÔªËرȽϰԵÀ£¬Ä¬ÈÏ״̬ÏÂÿ´Î¶¼Õ¼¾ÝÒ»Õû¸öÐУ¬ºóÃæµÄÄÚÈÝÒ²±ØÐëÔÙÐÂÆðÒ»ÐÐÏÔʾ¡£µ±È»·Ç¿é¼¶ÔªËØÒ²¿ÉÒÔͨ¹ýcssµÄdisplay:block;½«Æä¸ü¸Ä³É¿é¼¶ÔªËØ¡£´ËÍâ» ......
×¢£º"elm"´ú±íij¸öDOMÔªËØ£¬"xxx"´ú±íij¸öCSSÊôÐÔ
Ò»¡¢elm.style.xxx Ö»ÄÜ»ñÈ¡ÄÚÁªÑùʽÀïµÄÖµ
ÒªÏë»ñµÃÕýÈ·µÄcssÖµ£º
IE£ºelm.currentStyle[xxx]
W3C±ê×¼£ºdocument.defaultView.getComputedStyle(elm,"")[xxx]
×¢Ò⣺ÓÃIE·½·¨·µ»ØÖµ¿ÉÄܲ»ÊÇÊý×Ö£¬¶øÊÇauto£»ÓÃw3cµÄ·½·¨×ÜÊǻ᷵»ØÊý×Ö+µ¥Î»
Èý¡¢offsetLeft
......
ºÜ¶àʱºòÎÒÃDZØÐëʹһЩ¿éÔªËØ²¢ÅÅÏÔʾ£¬Ò»°ãÏëµ½µÄÊDZØÐëʹÓø¡¶¯£¬µ«ÊÇ¿éÔªËØ¸¡¶¯¸ø±ß¾à(margin)µÄʱºòÔÚIEÏ»á³öÏÖ¼Ó±¶µÄBUG£¬ËùÒԺܶàʱºò²»µÃ²»°ÑÕâ¸ö¿éÔªËØÌ×ÔÚÒ»¸öÄÚÁªÔªËØÀïÃæ£¬È»ºó¸øÄÚÁªÔªËظ¡¶¯ºÍ±ß¾à¡£½ñÌì¿´µ½ÁËâø·É¡¢ÇظèºÍÎÚÁú²è¹ØÓÚdisplay:inline-blockµÄÎÄÕ£¬ºÜ²»´í£¬×ÛºÏһϣ¬¼Ç¼ÏÂÀ´¡£
display:inl ......