twitter-bootstrap 如何使用 twitter bootstrap 向链接添加图标

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14932273/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 16:24:35  来源:igfitidea点击:

How to add icons to the link using twitter bootstrap

twitter-bootstrap

提问by Saurabh Kumar

enter image description hereI wanted to add icons to my links using twitter bootstrap.

在此处输入图片说明我想使用 twitter bootstrap 向我的链接添加图标。

I have input fields in as shown in snapshot. I want everything should look same including the box and icon but instead of a input box is it possible that i can have a link.

我有输入字段,如快照所示。我希望所有内容都应该看起来相同,包括框和图标,但我可以有一个链接而不是输入框。

PS : I don't want a select box. I want a link with a icon just like i can have a select box with a icon.

PS:我不想要一个选择框。我想要一个带有图标的链接,就像我可以有一个带有图标的选择框一样。

回答by Shail

Check jsfiddleThis way you can use icond with links

检查 jsfiddle这样您就可以将 icond 与链接一起使用

<li><a href=""><i class=" icon-pencil icon-2x"></i>About Us</a></li>