我试图使图像悬停在图像上时使其变得更大。但是,transition-delay
属性似乎不起作用。该图像由object
标记加载,但是我也尝试过使用img
标记。
Fiddle
<div id="c_a">
<object data="https://lh6.ggpht.com/Rr2X9m8HrCIGJrOKG3MOr9pRYERaa4yBLWUTeB6YNgJVlseJSMIbFWDc9nX6O2Y9HeWRf-2qL1gy0TInmKtKfRIBAJVPK4eglImapFb9=s660" type="image/jpg"></object>
</div>
CSS:
#c_a object{
transition: width 1s linear 2s, height 1s linear 2s;
-webkit-transition: width 1s linear 2s, height 1s linear 2s;
-o-transition: width 1s linear 2s, height 1s linear 2s;
-moz-transition: width 1s linear 2s, height 1s linear 2s;
}
#c_a object:hover{
width: 300%;
height: 300%;
}
最佳答案
首先给出100%的初始宽度和高度。
#c_a object{
width:100%;
height:100%;
// transitions..
}
Working Fiddle
关于html - CSS过渡延迟不起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23789066/