简体   繁体   English

我怎样才能使用fontawesome图标作为链接?

[英]how can i use a fontawesome icon as link?

i use fontawesome icons on my website. 我在我的网站上使用fontawesome图标。 i would like to add a link to this icons. 我想在此图标上添加一个链接。

for example : when someone clicks on the google icon the google page should open in a new window. 例如:当某人单击google图标时,应在新窗口中打开google页面。

 <div id="GooglePlus"> <i class="fa fa-google-plus"></i> </div> 

 href="http://google.com" target="_blank" 

how can i combine this two things ? 我如何将这两件事结合起来?

Try this: 尝试这个:

<div id="GooglePlus">
    <a href="http://google.com" target="_blank"><i class="fa fa-google-plus"></i></a>
</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM