我在Apple Mail中遇到了一个问题,即视网膜图像无法调整大小。我的代码是:
@media only screen and (-webkit-min-device-pixel-ratio: 2) {
.retina {
background: url(image@2x.png) no-repeat center 24px !important;
background-size: 40px 28px;
}
}
我更新了视网膜媒体查询,并将!重要声明添加到背景大小,按钮显示正常。但是,现在按钮上的链接在运行iOS7的Apple Mail中不起作用。
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (-moz-min-device-pixel-ratio: 2),
only screen and (-o-min-device-pixel-ratio: 2/1),
only screen and (min-device-pixel-ratio: 2),
only screen and (min-resolution: 2dppx) {
.retina {
background: url(image@2x.png) no-repeat center 24px !important;
background-size: 40px 28px !important;
}
}
该按钮用作所有其他邮件客户端中的链接,包括运行OSX 10.8.5的Mail.app,当窗口缩小以显示“移动”版本时。有关如何将按钮作为链接工作的任何解决方案?