Mailchimp中的可编辑背景图像 [英] Editable Background Images in Mailchimp
问题描述
尝试为Mailchimp编写电子邮件模板,而我试图能够通过Mailchimp本身编辑背景图片标签,因此我每次发送时都无需去更改代码
Trying to code an email template for Mailchimp, and I'm trying to be able to edit the background image tag of a via Mailchimp itself, so I dont need to go and change the code each time I want to send it out.
是否可以将背景标记声明为/@ 可编辑/区域,以便我可以更改mailchimp中的url?如果是这样,我将如何去做?
Is there a way to declare the background tag as an /@editable/ region so I can change thethe url in mailchimp? If so, how would I go about doing it?
当前代码:
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="wrap banner3" style="border-collapse: collapse; -webkit-background-size: cover; background-image: url(https://gallery.mailchimp.com/78524444e0a13e2b163d98bed/images/135974c9-84e6-4f03-9fde-891a893c58a8.jpg); background-color: #24272c; background-size: cover; background-position: 50% 50%; background-repeat: no-repeat;" background="https://gallery.mailchimp.com/78524444e0a13e2b163d98bed/images/135974c9-84e6-4f03-9fde-891a893c58a8.jpg">
我希望做什么:
/**
* @tab Background Images
* @section Event Image
*/
/*@editable*/ Var event-bg-img = "https://gallery.mailchimp.com/78524444e0a13e2b163d98bed/images/135974c9-84e6-4f03-9fde-891a893c58a8.jpg"
[...]
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="wrap banner3" style="border-collapse: collapse; -webkit-background-size: cover; background-image: url(event-bg-img); background-color: #24272c; background-size: cover; background-position: 50% 50%; background-repeat: no-repeat;" background="event-bg-img">
显然是在寻找可笑数量众多的电子邮件客户端所支持的解决方案.
Obviously looking for a solution that is supported across the ridiculous amount of email clients.
推荐答案
MailChimp编辑器的当前版本(截至2015年2月26日)确实允许创建可编辑的background-image
属性(sorta). HTML模板中的以下代码:
The current version of the MailChimp editor (as of Feb 26, 2015) does allow for making editable background-image
properties (sorta). The following code in your HTML template:
/*@editable*/background-image:url();
将产生如下所示的可编辑字段:
will produce an editable field like this:
通过将URL添加到背景图像,图像将出现在模板中.
By adding a URL to your background image the image will appear in your template.
例如:
url(http://placehold.it/350x150)
这将需要您将背景图像上传到MailChimp,然后获取URL并将其粘贴到url()
中,因此这不是理想的选择.对于中高级用户,此解决方案可能会很好地工作.
This would require you to upload the background image to MailChimp, then grab the URL and paste it into url()
, so it's not ideal. For intermediate to advanced users this solution might work well however.
这篇关于Mailchimp中的可编辑背景图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!