背景颜色的CSS过渡

Reg*_* Up 1 html css transition

我有一些带有悬停效果的图像,例如它们会改变身体的bgcolor.我希望在颜色之间进行过渡,但我太愚蠢了.我正在尝试使用它,但它仍然没有显示过渡.

-webkit-transition: background-color 1000ms linear;
-ms-transition: background-color 1000ms linear;
transition: background-color 1000ms linear;
Run Code Online (Sandbox Code Playgroud)

Ste*_*Bob 7

你不是傻瓜!只需要一些练习.你有什么是好的我只是看不到你的其余代码.但这就是你要找的东西:

div {
  display: block;
  width: 100px;
  height: 100px;
  background-color: red;
  transition: background-color 1000ms linear;
}

div:hover {
  background-color: green;
}
Run Code Online (Sandbox Code Playgroud)
<div>

</div>
Run Code Online (Sandbox Code Playgroud)