2017-06-12 35 views
0

如何刪除範圍內的標籤樣式/鏈接樣式?刪除範圍內的標籤文本樣式

代碼:

<button type="button" class="btn btn-danger btn-lg no-border" id="foo"> 
    <a href="#"> 
     <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>foo! 
    </a> 
</button> 
+0

「我怎樣才能刪除一個範圍內的標籤樣式/鏈接樣式」 - 你在說什麼樣式的特定位? – Quentin

+0

這完全是一個錯誤的語法... –

回答

0

你可以通過去除不應該存在反正錨標記刪除「鏈接式」 ..

<button type="button" class="btn btn-danger btn-lg no-border" id="foo"> 
    <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>foo! 
</button> 
0

我覺得你的代碼應該像這樣這:

<button type="submit" class="btn btn-danger btn-lg no-border" id="foo"> 
    <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>foo! 
</button> 

或本:

<a href="#" class="btn btn-danger btn-lg no-border" id="foo"> 
    <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>foo! 
</a> 

您不能將a標記放入button

如果你想刪除定位標記的樣式,你可以簡單地在你的CSS中定位它。像這樣:

<style> 
    a{ 
     text-decoration: none; 
     /* other styles here */ 
    } 
</style>