考虑下面的HTML:定位仿伪元素:后在Firefox
<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
元素没有考虑。
怎么回事?
http://jsfiddle.net/63EZB/4/这在 – bksi
工作问题是,你的th是与显示:内联代替块 – bksi