我目前正在我的导航栏上工作,但我坚持这样做:
http://i.stack.imgur.com/f0pBR.png
如您所见,每个图标都有一个重复的图标...
我正在使用 Bootstrap 2.3.2 和 FontAwesome 4.0.3
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
对于我使用 ng-repeat 属性 (AngularJS) ng-repeat 的标题:
<!-- HTML -->
<ul class="nav">
<li ng-repeat="tab in tabs" ng-class="{active:isActive(tab.href)}">
<a href="#{{tab.href}}">
{{tab.label}} <i ng-class="tab.ico">
</a>
</li>
</ul>
-
/* JS Ctrl */
$scope.tabs = [{label: "Title 1", href: "/Page1", ico: "fa fa-trophy"},
{label: "Title 2", href: "/Page2", ico: "fa fa-globe"},
{label: "Title 3", href: "/Page3", ico: "fa fa-whatever"},
{label: "Title 4", href: "/Page4", ico: "fa fa-rt"}];
我不知道我做错了什么。有什么线索吗?
谢谢。
事实上,多亏了 Jon Kartago Lamida,问题似乎来自 <i> 元素并将其替换为 <span> 元素解决了它。