【发布时间】:2016-10-15 03:08:36
【问题描述】:
我在一个 div 的背景上做了一个缩放效果。 直到今天它停止为 Chrome 运行时,所有这些都有效。对于其他所有浏览器,它都能完美运行。
这是我的代码:
.project_image {
width: 582px;
height: 280px;
background-position: center;
-webkit-transition: all .2s linear;
-moz-transition: all .2s linear;
-o-transition: all .2s linear;
-ms-transition: all .2s linear;
transition: all .2s linear;
background-size: 100%;
}
.project_image:hover {
background-size: 110%;
}
在 Chrome 上,当我将 div 悬停时,背景大小会立即设置为 110%,而不是像想要的那样缓慢。
【问题讨论】:
-
为您的代码创建一个有效的 jsfiddle,这不起作用。
-
css 对我来说很好用,我在 chrome、IE 和 firefox 中测试过……都一样
-
我用小提琴更新了帖子,对我来说不起作用,chrome 51.0.2704.84 m
-
这是工作编辑的 JS 小提琴:jsfiddle.net/ca79cohz/1
标签: css google-chrome animation