css

abbr.control-stick ???? ???? ??; ?? ??? ?? ?? ??? ??; ?? ??? ??? ?? ?? ???; ??? ?? ??? ?? ?? ???

???? CSS() ??? ???

??: css() ???? ???? ??? ??? ??? ?? ?? ????? ?????.

CSS ?? ??: ? ??? ???? ??? CSS ?? ?? ?????. ?? ???? ? ???? ?? CSS ??(?: "??" ? "???")? ???? ????.

??: ??$(selector).css(??)'

????:

ParametersDescription
name ?????. CSS ??? ??? ?????. ? ?????? ?? CSS ??? ??? ? ????. ?? ?? "??"???.

CSS ?? ??: ???? ?? ??? ?? ??? CSS ??? ?????.

??: ??$(selector).css(??,?)

????:

???? Description
name ?????. CSS ??? ??? ?????. ? ?????? "color"? ?? CSS ??? ??? ? ????.
? ????. CSS ??? ?? ?????. ? ?????? "red"? ?? CSS ?? ?? ??? ? ????. ? ??? ?? ??? ?? ???? ??? ??? ?????.

??? ???? CSS ?? ??: ???? ?? ???? ??? ?? ?? ?????. ? ??? ??? ?? ?? ?????. ? ?? ????? ?????. index? ?? ???? ?? ??? ??? ???? value? ?? ?? ????.

??: ??$(selector).css(??,??(??,?))

????:

ParametersDescription
?? ?? ?. CSS ??? ??? ?????. ? ?????? "color"? ?? CSS ??? ??? ? ????.
function(index,value)? CSS ??? ? ?? ???? ??? ?????.
index ????. ???
oldvalue ? ??? ??? ?????. CSS ??? ?? ?? ?????.

?? CSS ??/? ??: "??/? ?" ??? ???? ?? ??? ??? ???? ?????. ?? ???? ?? ??? ?? ?? ??? ??? ???? ?? ?? ?????.

??: ??$(selector).css({??:?, ??:?, ...})

????:

????Description
{??: ?} ?????. ??? ???? ??? ??/? ? ??? ?????. ? ?????? ?? CSS ?? ??/? ?? ??? ? ????. ?? ?? {"color":"red","font-weight":"bold"}

???? CSS() ??? ?

<html>
<head>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("button").click(function(){
    $("p").css("color","red");
  });
});
</script>
</head>

<body>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button type="button">改變段落的顏色</button>
</body>
</html>
???? ?? ?

??? ????? ??? "???? ??" ??? ?????