我正在使用基金会电子邮件来创建HTML电子邮件,它工作得很好,但是页脚图像并不遵守我设置的CSS来限制它们的大小。下面是如何将页脚注入页面中:
</a>
</columns>
</row>
{{>footer}}
</container>
下面是页脚页面中的代码:
<row class="background-aqua socialLinks">
<columns small="3" large="3" >
<spacer size="16"></spacer>
<a href="http://www.facebook.com/splenda">
<center><img src="http://image.splenda-email.com/lib/fe8f137276650c7e7d/m/1/Facebook+Logo.png"/></center>
</a>
</columns>
<columns small="3" large="3">
<spacer size="16"></spacer>
<a href="http://instagram.com/splenda">
<center><img src="http://image.splenda-email.com/lib/fe8f137276650c7e7d/m/1/instagram.png"/></center>
</a>
</columns>
<columns small="3" large="3" >
<spacer size="16"></spacer>
<a href="http://www.pinterest.com/SPLENDA/">
<center><img src="http://image.splenda-email.com/lib/fe8f137276650c7e7d/m/1/pinterest.png"/></center>
</a>
</columns>
<columns small="3" large="3" >
<spacer size="16"></spacer>
<a href="http://twitter.com/splenda">
<center><img src="http://image.splenda-email.com/lib/fe8f137276650c7e7d/m/1/twitter.png"/></center>
</a>
</columns>
</row>
下面是关于页脚的CSS:
.socialLinks{
max-width: 700px;
a{
max-height: 35px;
max-width: 35px;
}
img{
padding:20px 0px;
width:35px;
height:35px;
max-height: 35px;
max-width: 35px;
}
}
.footer{
img{
padding: 45px 0 15px 0;
max-width:148px;
height: auto;
}
p{
color:white;
font-size: 12px;
line-height: 16px;
margin: 0;
}
.footerLink{
text-decoration: underline;
font-weight: bold;
color:white;
}
}
电子邮件中的所有其他图像都适合,但socialLinks类下的图像不能保持35px。这只在Outlook上发生,而不是在其他电子邮件客户端上。是否有解决此问题的方法或Outlook的解决方法?我知道它是出了名的讨厌与HTML电子邮件,所以任何帮助是感激的。
发布于 2018-06-16 02:42:22
任何未来遇到这个问题的电子邮件开发人员都可以解决这个问题。您需要以内联方式添加图像的宽度和高度,而不是通过css添加,这样图像将如下所示:
<img src="www.image.com" width="35" height="35"/>
而不仅仅是图像源和设置高度和宽度的css
https://stackoverflow.com/questions/50880683
复制相似问题