作者:快乐生活HAPPY-GO | 来源:互联网 | 2023-07-07 00:30
IamtryingtocssthesharebuttonwithFont-Awesomeicon.Iusepaddingtocreateeachiconswidt
I am trying to css the share button with Font-Awesome icon. I use padding to create each icon's width. However, when it reach to the end of the div, it cut off like below's image. Why don't I use share-icon image instead? I though image will slow down the page loading.I had tried margin, not working. White-space:nowrap will penetrate the div and give me one line. Help, please.
我试图用Font-Awesome图标css分享按钮。我使用填充来创建每个图标的宽度。然而,当它到达div的末尾时,它会像下面的图像一样切断。为什么我不使用share-icon图像呢?我虽然图像会减慢页面加载速度。我曾试过保证金,而不是工作。白色空间:nowrap将穿透div并给我一条线。请帮忙。
.share_buttons{
margin-top: 9px;
line-height: 4.4;
}
.share_buttons a{
color:#fefefe;
background:#7f98cf;
padding: 17px 15px 6px 15px;
-moz-border-radius: 50px;
-webkit-border-radius: 50px;
border-radius: 12px;
margin-left:4px;
margin-bottom:90px;
text-decoration:none;
text-align: center;
cursor:pointer;
}
.share_buttons a#facebook{
background:#3b4ca4;
}
.share_buttons a#plus_share{
background:#5976B5;
}
.share_buttons a#twitter{
background:#73c6f1;
}
.share_buttons a#google_plus{
background:#cb0000;
}
.share_buttons a#tumblr{
background:#386082;
}
.share_buttons a#reddit{
background:#c1c1c1;
color:#333;
}
.share_buttons a#linkedin{
background:#00649e;
}
.share_buttons a#pinterest{
background:#e30000;
}
.share_buttons a#stumbleupon{
background:#eb4924;
}
.share_buttons a#envelope{
background:#65c093;
}
3 个解决方案