【问题标题】:Img transition scale changes containerimg 过渡比例更改容器
【发布时间】:2017-05-16 17:29:42
【问题描述】:

我有一个 img 标签,我想在将鼠标悬停在父元素上时放大它,而无需更改容器大小。我有代码:

 .results_box_custom:hover  p img{
 -moz-transform: scale(1.2);
 -webkit-transform: scale(1.2);
 transform: scale(1.2);
 -moz-transition: all 0.3s;
  -webkit-transition: all 0.3s;
  transition: all 0.3s ease-in-out;
}

适用于不同页面但不适用于此页面。

感谢任何帮助!

【问题讨论】:

    标签: css image hover transform scale


    【解决方案1】:

    您想隐藏父元素上的溢出。添加.results_box_custom p { overflow: hidden; }

    【讨论】:

      猜你喜欢
      • 2014-06-28
      • 1970-01-01
      • 2013-08-04
      • 2013-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多