我们使用表格的组合来隐藏和显示不同的内容。根据图像的大小,您可以调整 td 的高度和宽度。
款式:
td.inner { display:none; }
table.promo_1_pic_1 { float: none; width:100%; height:95px; }
table.promo_1_pic_1 td { background: #fff url(test.jpg) no-repeat 0px !important; }
table.promo_2_pic_2 { float: none; width:100%; height:95px; }
table.promo_2_pic_2 td { background: #fff url(test.jpg) no-repeat 0px !important; }
table.promo_3_pic_3 { float: none; width:100%; height:109px; }
table.promo_3_pic_3 td { background: #fff url(test.jpg) no-repeat 0px !important; }
table.promo_4_pic_4 { float: none; width:100%; height:109px; }
table.promo_4_pic_4 td { background: #fff url(test.jpg) no-repeat 0px !important; }
HTML:
<td class="desktop-table" bgcolor="#ffffff" style="padding:20px; background-color:#ffffff; font-family: Arial, Helvetica, sans-serif;">
<!-- promo 1 content -->
<table class="promo_1_pic_1"><tr><td></td></tr></table>
<table class="promo_2_pic_2"><tr><td></td></tr></table>
<table class="promotion">
<tr>
<td class="inner"><a href="#"><img src="test.jpg" alt=""/></a>
</td>
<td class="inner"><a href="#"><img src="test.jpg" alt=""/></a>
</td>
</tr>
</table>
</td>
<td class="desktop-table" bgcolor="#ffffff" style="padding:0 10px 10px 10px; background-color:#cfe6f6; font-family:Arial, Helvetica, sans-serif;">
<!-- promo 1 content -->
<h3 style="margin:25px 0px 0px 22px;">You might also be interested in:</h3>
<table class="promo_3_pic_3"><tr><td></td></tr></table>
<table class="promo_4_pic_4"><tr><td></td></tr></table>
<table class="promotion">
<tr>
<td class="inner"><a href="#"><img src="test.jpg"></a>
</td>
<td class="inner"><a href="#"><img src="test.jpg"></a>
</td>
</tr>
</table>
</td>