html - Chrome 51 中的背景大小转换 - 错误还是功能?

标签 html css google-chrome css-transitions

背景尺寸转换不再适用于 Chrome 51 .我知道它从来不应该起作用(参见 this ),但它确实起作用了,而且仍然有很多人在使用它。我说的是悬停时的百分比转换。

我想知道这是否是新 Chrome 中的错误(这是可能的,因为这个版本带来了很多新东西),或者他们已经决定永久删除该过渡?

在其他浏览器中没有问题。


div {
  background: url(http://cdn2.business2community.com/wp-content/uploads/2014/12/Super-Mario-no-longer-the-007.jpg) no-repeat center center;
  background-size: 50%;
  display: inline-block;
  height: 276px;
  width: 460px;
  transition: all 0.5s linear;
}
div:hover {
  background-size: 100%;
}
<div></div>


更新

正如@Paran0a 所注意到的,它与特定于供应商的前缀配合得很好,所以它可能是一个错误(提交了错误报告):


div {
  background: url(http://cdn2.business2community.com/wp-content/uploads/2014/12/Super-Mario-no-longer-the-007.jpg) no-repeat center center;
  -webkit-background-size: 50%;
  display: inline-block;
  height: 276px;
  width: 460px;
  transition: all 0.5s linear;
}
div:hover {
  -webkit-background-size: 100%;
}
<div></div>

最佳答案

关于html - Chrome 51 中的背景大小转换 - 错误还是功能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37545089/

相关文章:

javascript - Chrome 扩展 |有没有办法让 chrome.storage.local.get() 返回一些东西?

html - 如何将跨度放在另一个跨度下,以便编写简单的数学?

css - 日历的制作方法

javascript - jquery 移动更改为下一个和上一个 data-role=page

html - 调整表格行高,无论行数多少,100%填满表格

html - 如何使用 css 在 html 中给表格加边框

javascript - 绕过有声视频的 chrome 自动暂停?

javascript - KineticJS:Firefox 与 Chrome 中的动画性能

html - 选定的链接需要突出显示

HTML减少图像上的渐变层?