【发布时间】:2017-02-15 23:53:33
【问题描述】:
在查看桌面和移动设备时,我的图像交换代码遇到了问题。它似乎适用于某些平台,但不适用于 Android 移动设备和某些版本的 Outlook。我能得到一些帮助吗?
<style>
.visible-mobile {
display: none !important;
}
@media (max-width: 489px) {
.visible-mobile {
display: inline !important;
}
.hidden-mobile {
display: none !important;
}
}
</style>
还有内容
<img src="https://thumb9.shutterstock.com/display_pic_with_logo/839950/117069988/stock-photo-dog-listening-with-big-ear-117069988.jpg" style="width: 100%; max-width: 600px; border: none; height: auto;" alt="houdini" class="visible-mobile">
<img src="https://thumb1.shutterstock.com/display_pic_with_logo/2997419/259670459/stock-photo-happy-dog-with-tongue-out-and-head-tilt-259670459.jpg" style="width: 100%; max-width: 600px; border: none; height: auto;" alt="houdini" class="hidden-mobile">
【问题讨论】:
-
“不工作”不是一个技术术语。什么不工作以及如何工作?该标记是否显示了问题?
-
电子邮件中的 HTML 和 CSS 具有糟糕的支持和一致性。媒体查询充其量只是一个长镜头。根据经验,如果一项技术在 2010 年左右在网络上被认为是“先进的”,那么今天它可能仍然是电子邮件中的禁忌。
标签: html css responsive-design html-email