如果我从我的文本中删除了font-awesome标签的css代码字体样式:italic;但有了这行代码{{“Andy's Bike Shop”}},斜体停止工作。如何使用font-awesome标签中的文本进行斜体显示?
CSS
.header{
font-style:italic;
background-color:black;
height:60px;
color:white;
font-weight:bold;
font-size:40px;
position:relative;
padding-top:10px;
padding-left:16px;
margin-left:-10px;
margin-right:-10px;
margin-top:-10px;
}
HTML
<html ng-app='formApp'>
<head>
<script src="bower_components/angular/angular.js"></script>
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">
<script src="app.js"></script>
<link href="app.css" rel="stylesheet">
</head>
<body>
<div class="header">
<div class="container">
<div class='row'>
<div class='col-md-12'>
<i class="fa fa-bicycle" aria-hidden="true">{{"Andy's Bike Shop"}}</i>
</div>
</div>
</div>
</div>
<i class="fa fa-file-pdf-o" aria-hidden="true">
{{'hello'}}</i>
</body>
</html>
答案 0 :(得分:1)
在
中添加span
标记
<i class="fa fa-bicycle" aria-hidden="true"><span>{{"Andy's Bike Shop"}}</span></i>
将css用作.header .fa span { font-style: italic; }