回答編集履歴

1

修正、追記

2017/03/25 14:36

投稿

s8_chu
s8_chu

スコア14731

test CHANGED
@@ -1,4 +1,10 @@
1
- 他の方の回答にあるとおり、原因は[animate関数](http://js.studio-kingdom.com/jquery/effects/animate)には数値を指定できるプロパティしか指定できないことですが、別の解決策として、[jQuery Color](https://github.com/jquery/jquery-color)というプラグインを利用するという手段もありかと思いますこのプラグインを使うことで[animate関数](http://js.studio-kingdom.com/jquery/effects/animate)で使用できるようになるプロパティは以下のとおりです。
1
+ 他の方の回答にあるとおり、原因は[animate関数](http://api.jquery.com/animate/)には一部例外を除いて数値を指定るプロパティしか指定できないことです。
2
+
3
+ > The .animate() method allows us to create animation effects on any numeric CSS property. The only required parameter is a plain object of CSS properties. This object is similar to the one that can be sent to the .css() method, except that the range of properties is more restrictive.
4
+
5
+
6
+
7
+ この問題の解決策として、[jQuery Color](http://api.jquery.com/animate/)というプラグインを利用するという手段もありかと思います。このプラグインを使うことで[animate関数](http://js.studio-kingdom.com/jquery/effects/animate)で使用できるようになるプロパティは以下のとおりです。
2
8
 
3
9
  - [background-colorプロパティ](http://www.htmq.com/style/background-color.shtml)
4
10