我正在为 Gmail 应用程序创建一个 html 模板。在我添加了一张图片,它应该在桌面视图中占 60%,在移动 gmail 应用程序视图中占 100%。
这是 img 标签宽度 60%:
<div>
<img src="show.jpg" alt="Show your skills" class="mob-img" border="0"
style="outline:none; text-decoration:none; -ms-interpolation-mode: bicubic;
width:60%;" />
</div>
Run Code Online (Sandbox Code Playgroud)
在媒体查询中,我做到了 100%。但它在 gmail 应用程序中不起作用。
@media only screen and (max-width: 600px) {
.mob-img {
width: 100% !important;
}
}
Run Code Online (Sandbox Code Playgroud)
我不明白为什么这在 gmail 应用程序中不起作用。如果我遗漏了什么,请告诉我。
提前致谢