HTML中按钮内的图标 [英] Icon inside button in HTML
本文介绍了HTML中按钮内的图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在HTML的按钮内放置小图标(例如,我需要在网站上放置facebook按钮,在按钮内先放置F图标,然后再放置"facebook").该怎么做?
I need to put small icon inside button in HTML (for example I need to have facebook button on my site, inside button first F icon and then "facebook"). How to do that ?
推荐答案
.facebook-button {
background: url('https://2.bp.blogspot.com/-lFFvYHv-Z8w/WAOFS0P5FdI/AAAAAAAAF68/Aiv0D5NkUKIbL3_6G42LZm1iQ6co1tmgACLcB/s320/facebook-16px.png') left center no-repeat;
padding-left: 15px;
}
<!DOCTYPE html>
<html>
<body>
<input type="button" class="facebook-button" value=" Facebook" />
</body>
</html>
这篇关于HTML中按钮内的图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文