如何在所有浏览器中进行此转换工作?它仅在Chrome中运行,尽管我已将这些值应用于所有浏览器。 (我也尝试过在其他计算机上,但我得到了相同的结果):仅在Chrome中使用CSS3转换
.titlu
{
background:url(images/titlu.png);
background-repeat: no-repeat;
width:716px;
height: 237px;
display: block;
position: absolute;
top:460px;
right: 255px;
z-index: 5;
-webkit-transition: background 0.20s linear;
-moz-transition: background 0.20s linear;
-o-transition: background 0.20s linear;
transition: background 0.20s linear;
}
.titlu:hover
{
width:716px;
height: 237px;
display: block;
z-index: 5;
background-repeat: no-repeat;
background-image:url(images/titlu2.png);
}
我一直问到指定问题的更详细...我的意思通过不工作是WebKit的效果不适用于图像...悬停的作用只是过渡不生效。
使用JavaScript。 – 2013-03-14 22:59:42
1)仅将过渡应用于“背景图像”。 'transition:background-image .2s linear;'2)“不工作”并不能告诉我们多少,如果有的话。问题具体是什么? – Shmiddty 2013-03-14 23:01:05
我知道Javascript会完成这项工作,但我更喜欢使用CSS3。无论如何,如果你知道一个简单的方法来达到相同的效果,但在同一时间保持简单随时提供帮助:) – 2013-03-14 23:09:17