css 是用來設定樣式的

在JQuery 中 用法如下

 

<div id="abc" color="blue">div test</div>

1.設定單一css 屬性

$("#abc").css("color","red");

2.設定多個 css 屬性

$("#abc").css({ color: "red", background: "blue" });

3.取得css的屬性值

$("#abc").css("color")

arrow
arrow
    全站熱搜

    yuanann 發表在 痞客邦 留言(0) 人氣()