我的HTML中有一个按钮而在CSS上我创建了一个淡入淡出的悬停效果
.hvr-fade3 {
height: 50px;
width: 50px;
border-radius: 50px;
border-color: transparent;
color: rgba(107,176,254,0.90);
-webkit-transform: translateZ(0);
transform: translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-moz-osx-font-smoothing: grayscale;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-property: color, background-color;
transition-property: color, background-color;
float: left;
margin-left: 50px;
margin-top: 20px;
}
.hvr-fade3:hover, .hvr-fade3:focus, .hvr-fade3:active {
background-color: rgba(108,247,97,0.82);
color: white;
}
.hvr-fade3 img {
height:100%;
width:100%;
opacity:0.8;
display:block;
}
<button type="button" onclick="cloneSelect()" class="hvr-fade3"><img src="images/plusbt.svg"></button>
然而,图像看起来有一些不需要的填充,看起来像这样:
如何删除额外的空白区域并使蓝色圆圈跨越整个圆圈?
UPDATE 将填充设置为填充后:0px; img看起来像这样
谢谢, 奥利弗