html - 定位:after in Firefox这样的伪元素

标签 html css firefox

考虑以下 HTML:

<table>
  <thead>
      <tr>
          <th class="title">Test title</th>
      </tr>
  </thead>
</table>

以及以下 CSS:

table {
    width: 400px;
    border: 1px solid #ccc;
}

th.title {
    position: relative;
    text-align: center;
}

th.title::after {
    position: absolute;
    right: 5px;
    content: '>';
}

参见 JSFiddle http://jsfiddle.net/63EZB/1 .

我想要的是大于号出现在第th的右边。上面的代码在 Chrome 和 IE8+ 中都有效,但在 Firefox (28) 中无效。 Firefox 将标志绝对定位在窗口的右侧,例如不考虑 th 元素的 relative 位置。

出了什么问题?

最佳答案

寻找这样的东西 Link

CSS:

th.title::after {       
    margin-right: 5px;
    float:right;
    content:'>';
}

关于html - 定位:after in Firefox这样的伪元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23290533/

相关文章:

Javascript-iframe 通信

html - 简单的 HTML 渲染问题

javascript - 从下拉列表生成 .txt 文件

css - 定位 div 的问题

javascript - 音频 blob 的 URL.createObjectURL 在 Firefox 中给出 TypeError

javascript - firefox中输入框取数值

html - Image Map 在 Firefox 中不工作!在 Chrome+Safari 中运行良好

javascript - 使用 jQuery 折叠菜单和一个切换折叠的按钮

html - Iphone 响应问题

html - 在标题中将此导航元素居中时出现问题