2014-11-08 85 views
0

我試圖在懸停時禁用錨定標記下劃線。我已經加入text decoration: none;我.scss文件像這樣:錨定標記在懸停時保持下劃線

$font-family-serif: 'Nixie One'; 
$font-family-base: $font-family-serif; 
@import "bootstrap"; 
//@import "bootstrap-sprockets"; 

//TB Navbar overrides to change the color scheme 
$bgDefault  : #ffffff; 
$bgHighlight : #ffffff; 
$colDefault  : #8587f1; 
$colHighlight : #4e5aff; 
.navbar-default { 
    font-weight: bold; 
    font-size: 25px; 
    background-color: $bgDefault; 
    border-color: $bgHighlight; 
    text-decoration: none; 

而且當我在看網頁,它似乎正確地計算規則:

Why is it still underlined?

我要去哪裏錯了這裏?

回答

0
.navbar-default { 
    font-weight: bold; 
    font-size: 25px; 
    background-color: $bgDefault; 
    border-color: $bgHighlight; 
    text-decoration: none; 
    a 
    { 
    text-decoration: none; 
    &:hover{ 
     text-decoration: none; 
    } 
    } 
0

所以顯然問題是我只需要在我的scss文件中指定一個標籤:a {text-decoration: none;}而不是僅僅爲類設置它。