首页 > 解决方案 > 将图像悬停在圆形块中。如何修复chrome中的错误?

问题描述

在此处输入图像描述当您悬停时,边框的边缘变为方形,然后变为圆形。在 Mozilla 中一切正常。如何修复这个错误?

.advantage {
	display: flex;
	align-items: flex-end;
	padding: 16px;
	background: #D8DCE3;
	border-radius: 20px;
	overflow: hidden;
  height: 100px;
  width: 300px;
  position: relative;
}

.advantage img {
		position: absolute;
		top: 0;
		left: 0;
		transition: transform .3s;
		filter: grayscale(100%);
		border-radius: 10px;
    object-fit: cover;
    height: 100%;
    width: 100%;
	}
	
.advantage:hover img {
		transform: scale(1.1);
		filter: grayscale(0%);
}
<div class="advantage">
	<img src="https://tympanus.net/Development/DistortionHoverEffect/img/Img22.jpg" alt="">
</div>

标签: htmlcssgoogle-chrome

解决方案


推荐阅读