2013-08-16 74 views
1

在引導的文檔,我讀到的圖標,並試圖將其納入我的文件中像這樣引導圖標不可見

<!doctype html> 
<html> 
<head> 
<meta charset = "utf-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<title> Getting started with bootstrap</title> 
<link href ="css/bootstrap.css" rel ="stylesheet" type="text/css"> 
<!-- HTML5 shim for IE backwards compatibility --> 
    <!--[if lt IE 9]> 
     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> 
    <![endif]--> 
</head> 

<body> 
<div class ="container-fluid"> 
    <header class= "row-fluid"> 
     <h1 class="span12" >This is my first Bootstrap page.</h1> 
    </header> 
    <i class="icon-calendar"></i> 

</div> 
<script src = "js/jquery-1.10.2.min.js"></script> 
<script src = "js/bootstrap.min.js"</script> 
</body> 
</html> 

但沒有任何反應。沒有日曆圖像可見。

+1

顯示完整的html – prem

+0

Bootstrap的版本是什麼? –

+0

標記正確。這發生在代碼的某處。 – Ashwani

回答

1

好的,這是答案。由於您使用的是Bootstrap 3,因此您忘記了包含圖標包。這裏是你應該怎麼做:

<span class="glyphicon glyphicon-ok"></span>. 
  1. 去這裏:http://glyphicons.getbootstrap.com/
  2. 單擊下載從GitHub
  3. 解壓的文件夾和css文件夾中的內容複製到自己的CSS文件夾中。
  4. 將字體文件夾複製到相同的目錄作爲您的css文件夾。
  5. 然後,一旦你添加了字體和CSS,添加如上所示的代碼。
+0

如果你也投票給我,我會愛上:)我確信它的工作原理 –

1

嘗試此

<i class="icon icon-calendar"> </i> 
+0

我試過了。它沒有幫助,因爲我的bootstrap 3 – mascot6699

+0

@ mascot6699:檢查我的答案,它會做的伎倆:) –

0

自舉3不再包括在它的基本包glyphicons。從Bootstrap 3 RC2 Reference,

隨着Bootstrap 3的推出,圖標已被移至單獨的存儲庫。這使得主項目儘可能地變得精簡,使得人們更容易交換圖標庫,並且使Bootphrap以外的更多人更容易地使用Glyphicons圖標字體。

+0

我讀了你給的參考。看來我正在閱讀較老的文件 – mascot6699