我遇到了一个棘手的问题。我需要在缩放图像后居中水平和垂直图像。这是我的HTML:
li {
float: left;
padding: .78125%;
width: 31.25%;
/*li tag height and width is not fixed for screen adaptation*/
}
<!-- The code run in mobile browser.So do not think too much fu*king compatibility-->
<ul>
<li>
<a href
我想显示一个图像左对齐(在左/右有一些填充),但垂直居中的表格单元格,同时保持文本的水平和垂直居中。
JSFiddle完整示例:
<tr>
<td>
<img title="Out of stock" src="..."><!-- This image may or may not exist -->
<a href="">4000.4</a>
</td>
<td>Lemon soda</td>
<t