如何在导航栏中更改:hover的形状?

我在导航栏社交图标上添加了透明的悬停, 但是我不知道如何更改悬停的形状。当前看起来像这样:

Facebook悬停

我希望悬停仅显示在图标本身上, 而不是其上方和下方的空间。

<li id="menu-item-518" class="fb-icon menu-item menu-item-type-custom menu-item-object-custom menu-item-518"><a title="Facebook" href="https://www.facebook.com/linkhere">Facebook</a></li>

我的孩子主题的CSS当前是:

/* Social link hover colour */
.fb-icon.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-518 a:hover{
	background-color:transparent;
}

谢谢


#1


请尝试删除padding-top和padding-bottom, 并在需要时将其替换为margin-top和margin-bottom。

所以也许是这样的:

.my-icon {
  padding-top: 0;
  padding-bottom: 0;
}

来源:

https://www.srcmini02.com/65200.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_41048.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?