2017-06-12 54 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>