Html 引导按钮href与我的代码链接?
我已经创建了一个按钮,是否也可以添加一个“href”链接到此代码? 我的链接不工作Html 引导按钮href与我的代码链接?,html,bootstrap-4,Html,Bootstrap 4,我已经创建了一个按钮,是否也可以添加一个“href”链接到此代码? 我的链接不工作 <button class="buttoncostum"> <a href="http://example.com/"><span class="glyphicon glyphicon-th-list" style="color:white" aria-hidden="true"></span><font color="white"> <b>
<button class="buttoncostum">
<a href="http://example.com/"><span class="glyphicon glyphicon-th-list" style="color:white" aria-hidden="true"></span><font color="white"> <b>Example</b></a></font></button>
抱歉,如果代码看起来不好,我对编码是新手;)
谢谢大家 您需要为标记
a
使用引导类,而不使用按钮
标记
<a href="http://example.com/" class="btn btn-primary">
<span class="glyphicon glyphicon-th-list"></span> Example
</a>
我清理了一下你的HTML,用CSS类和ID代替内联CSS 如果您正在使用引导,则可以执行以下操作:
<a href="http://www.google.com" class="btn btn-primary">link</a>
我认为按钮内的链接无效。请告诉我解决方案好吗?或者,如果我可以提交到一个页面?你想要什么?为什么要使用“锚定内部”按钮?非常感谢这很好:)