【发布时间】:2013-09-23 14:38:24
【问题描述】:
我正在开发一封电子邮件,并且希望图像仅显示在移动设备上......所以我创建了一个空的<td>,其中包含一个跨度,并将跨度设置为具有背景图像。
问题是,我希望图片占据一整行,而不是紧挨着标题。我尝试了clear:both 和display:block,但我不确定为什么它不起作用。我还尝试将宽度设置为 100%,但这只会让所有事情都失败……有什么建议吗?
.test {
width: 41px;
height: 41px;
background-image: url('http://placehold.it/41x41');
background-repeat: no-repeat;
background-size: 41px 41px;
display: block;
clear: both !important;
}
【问题讨论】:
标签: html css html-table html-email