css - 带有 Bootstrap 按钮的 Firefox 中的链接不活动

标签 css firefox twitter-bootstrap

我在构建我的 wordpress 网站时遇到了一个奇怪的问题。 Bootstrap 按钮内的所有链接在 Firefox 中均未激活。

什么会导致这种情况?

这是 html 输出:

<button class="btn pull-right" role="button">
<a href="http://domain.dev/?cat=4" name="View all News">
    All News
</a>
</button>

这是CSS:

.home #primary #home-more .btn {
background-image: url("../img/home-button-sprite-more.png");
background-repeat: no-repeat;
margin-right: 0px;
background-color: transparent;
padding: 13px 40px;
background-position: 20px 0px;
}
button.btn {
display: inline-block;
padding: 13px 24px; 
margin-bottom: 0px;
margin-right: 10px;
font-size: 10px;
text-transform: uppercase;
font-weight: bold;
line-height: 1;
text-align: center;
vertical-align: middle;
cursor: pointer;
border: medium none;
border-radius: 0px 0px 0px 0px;
white-space: nowrap;
-moz-user-select: none;
}

最佳答案

代替,

<button class="btn pull-right" role="button">
<a href="http://domain.dev/?cat=4" name="View all News">
    All News
</a>
</button>

你必须使用,

<a href="http://domain.dev/?cat=4" name="View all News">
  <button class="btn pull-right" role="button">
    All News
  </button>
</a>

或者,

<a href="http://domain.dev/?cat=4" title="View all News" class="btn pull-right">
    All News
</a>

关于css - 带有 Bootstrap 按钮的 Firefox 中的链接不活动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19218013/

相关文章:

css - 为什么 Firefox 以不同方式显示我的页面?

java - 使用 Selenium WebDriver 启动 TOR 浏览器时出错

html - Bootstrap : Make columns stack horizontally in row

twitter-bootstrap - Bootstrap 折叠面板默认关闭

css - 为什么我的表格列没有左对齐?

jquery - jQplot 条形颜色错误与负值

javascript - 将 material-ui 为子组件生成的样式放在为父组件生成的样式之后?

html - 没有宽度的CSS div中心

html - Firefox 和 Windows 中的 CSS 水平菜单问题

css - 让div使用屏幕的所有剩余高度