2015-08-15 51 views
1

我正在使用這個css-hint庫以及一些引導程序的左手和右手圖標。我宣佈css工具提示類爲底層,它正在工作。但是,如果我聲明工具提示爲class="hint-topclass="hint-topclass="hint-right它不起作用。默認情況下,它顯示所有文件的底部。不知道可能是什麼問題。這是我的代碼。css工具提示提示 - 頂部不起作用

<div class="pre-btn" class="hint--top hint--error" data-hint="Previous Page!"> 
    <a href="/jquery/jquery-basics" class="glyphicon glyphicon-hand-left "></a> 
</div> 
<div class="nxt-btn" class="hint--top" data-hint="Next page"> 
<a href="/jquery/jquery-selectors" class="glyphicon glyphicon-hand-right"></a><br /> 
</div> 

注:我使用的CSS工具提示提示版本Hint.css - v1.3.4 - 2015-02-28

+0

我在他們的榜樣注意到他們把他們的內聯,而不是塊。不知道是否是這樣。你能創造一個工作環境嗎? – artSir

回答

2

你有兩個單獨的類中聲明,你需要結合這些:

此>

class="pre-btn" class="hint--top hint--error" 

應該是這個>

class="hint--top hint--error pre-btn" 

body, 
 
html { 
 
    margin: 100px; 
 
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 
 
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" /> 
 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> 
 

 
<link href="https://cdn.jsdelivr.net/hint.css/1.3.2/hint.min.css" rel="stylesheet" /> 
 
<div class="hint--top hint--error pre-btn" data-hint="Previous Page!"> 
 
    <a href="/jquery/jquery-basics" class="glyphicon glyphicon-hand-left "></a> 
 

 
</div> 
 
<p>These are tooltips.</p> 
 
<div class="hint--bottom nxt-btn" data-hint="Next page"> 
 
    <a href="/jquery/jquery-selectors" class="glyphicon glyphicon-hand-right"></a> 
 

 
    
 
</div>

+0

太棒了!謝謝您的幫助。 – Packer

+0

沒問題,不客氣! – vanburen