jquery box-shadow未应用

时间:2013-09-19 13:28:27

标签: jquery css

我有这段代码:

$("#my_div").animate({
      "margin-left": "-145px",
      "background-color": "#ffffff",
      "width": "1240px",
      "padding": "6px 6px 6px 6px",
      "border-radius": "6px",
      "box-shadow": "0px 0px 9px #323232",
      "-webkit-box-shadow": "0px 0px 9px #323232"
}, 1000);

但未应用box-shadowpadding样式。 我无法发现错误...

1 个答案:

答案 0 :(得分:0)

试试这个:

$("#my_div").animate({
      "margin-left": "-145px",
      "background-color": "#ffffff",
      "width": "1240px",
      "padding": "6px 6px 6px 6px",
      "border-radius": "6px",
      boxShadow: "0px 0px 9px #323232", //change here
      paddingTop:'6px',
      paddingLeft:'6px',
      paddingRight:'6px',
      paddingBottom:'6px',
}, 1000);

参考:Correct way to animate box-shadow with jQuery