Html 展览上的回应问题
我创建了一个响应邮件,客户在购买机票时会收到该邮件。在同一个文件中,我有两个不同的CSS类:Html 展览上的回应问题,html,css,email,Html,Css,Email,我创建了一个响应邮件,客户在购买机票时会收到该邮件。在同一个文件中,我有两个不同的CSS类: *[class=noDisplayAtMobile] { display: none !important; display:none; mso-hide:all } *[class=displayAtMobile] { display: block !important; width:100% !important; max-width:650px !important ; max-height:i
*[class=noDisplayAtMobile] { display: none !important; display:none; mso-hide:all }
*[class=displayAtMobile] { display: block !important; width:100% !important; max-width:650px !important ; max-height:inherit!important; float:none !important; overflow:visible !important; }
第一个类用于在桌面上显示邮件,第二个类用于在移动设备上显示邮件,当我在原始(全屏)布局中使用第二个类时,我使用follow样式来不全屏显示邮件
style="width: 0; max-height: 0; overflow: hidden; float: left;"
当我的浏览器窗口小于650px时,我看到响应输出,当它全屏显示时,我看到非响应输出,但在邮件(GMail)中,我看到了这两种输出
有人知道问题是什么吗?我能做些什么来解决它?您应该尝试下面的代码
.your_class { display: none !important; display:none; mso-hide:all }
@media (max-width: 650px) { //apply css when screen width <=650px
.your_class { display: block !important; width:100% !important; max-width:650px !important ; max-height:inherit!important; float:none !important; overflow:visible !important; }
}
.your_类{display:none!重要;display:none;mso hide:all}
@媒体(最大宽度:650px){//当屏幕宽度时应用css我假设您的css是内联的,而不是在单独的样式表中?