我有以下代码与doctype transitional,但当我将其设置为strict时,图像的位置会发生变化并向上移动.能否帮助我理解潜在的问题,以及在哪里可以找到不同doctypes之间这些类型的其他CSS冲突的列表.
请注意,我知道很少有HTML标签在严格模式下不可用,但我特别关注CSS冲突.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
<style type="text/css">
span.check:before { content: url("http://i41.tinypic.com/2rxea7d.png"); }
</style>
<table>
<tr>
<th>Ruby on Rails</th>
<td><span class="check"></span></td>
<td><span class="check"></span></td>
<td><span class="check"></span></td>
<td><span class="check"></span></td>
</tr>
<tr>
<th>Road on Rails</th>
<td><span class="check"></span></td>
<td><span class="check"></span></td>
<td><span class="check"></span></td>
<td><span class="check"></span></td>
</tr>
</table>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
在怪异模式和几乎标准模式下,图像(它们是内联内容,因此与字体字符布置在同一组行上)在其基线处的高度为零。
vertical-align您可以通过调整生成的图像的属性或将它们设置为在标准模式下获得相同的效果display: block。
| 归档时间: |
|
| 查看次数: |
688 次 |
| 最近记录: |