background or background-color? Which one is safe to use?

I just now found that when I try to change `background-color` using YUI for a body it doesn't work in FF5 and Opera but works in IE and Chrome. However, if I set color values for `background` it works in FF as well as Opera. I thought that `background-color` was just some sort of specialisation for `background`. Which one can be used safely across all browsers? Code in question can be seen here, https://stackoverflow.com/questions/6930302/background-or-background-color-which-one-is-safe-to-use, I still have problem understanding how YUI handles events. I have also hosted the page with modified code here http://www.kumarchetan.com/yui-module.html, try accessing this page using IE, Chrome, FF and Opera and notice how smoothly the values change in different browsers.
Can you show some code please. background-color works fine for me in FF5

以上就是background or background-color? Which one is safe to use?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏