我需要将表格单元格的背景图像对齐为
垂直方向顶部 - 右侧水平方向
但它显示为,
垂直中心; 在水平方向
请看这个页面:http://www.chemfluence.org.in/monetarist/index_copy.php
这是我的代码,
<td width="178" rowspan="3" valign="top"
align="right" background="images/left.jpg"
style="background-repeat:no-repeat;background-position:right;">
</td>
Run Code Online (Sandbox Code Playgroud)
如果我使用background-position:Top; 它是水平居中对齐,请告诉我哪些应该更正.
Gho*_*wer 11
像这样用你的内联css
<td width="178" rowspan="3" valign="top"
align="right" background="images/left.jpg"
style="background-repeat:background-position: right top;">
</td>
Run Code Online (Sandbox Code Playgroud)
这适用于IE9(兼容性视图和普通模式),Firefox 17和Chrome 23:
<table>
<tr>
<td style="background-image:url(untitled.png); background-position:right 0px; background-repeat:no-repeat;">
Hello World
</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)