[英]How do I add CSS to my `mailchimp` popup form?
I am using mailchimps popup subscribe form.我正在使用 mailchimps 弹出订阅表单。 I have styled the content in mailchimp as far as I can.我已经尽可能地设计了 mailchimp 中的内容。 I want to add some more CSS to the popup, I have tried adding CSS to the CSS sheet already loading in my site yet the form will not pick it up in the popup even with !important etc.我想向弹出窗口添加更多 CSS,我尝试将 CSS 添加到已加载到我的站点中的 CSS 表中,但即使使用 !important 等,表单也不会在弹出窗口中选择它。
The code from mailchimp is: mailchimp 的代码是:
<script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script>
<script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us8.list-manage.com","uuid":"731f7bb19522a201007a53699","lid":"138afe0d12"}) })</script>
Now, I have tried also adding inline styling in my page for a test, example:现在,我还尝试在我的页面中添加内联样式进行测试,例如:
<style>
#mc-EMAIL {
border:6px solid pink !important;
}
</style>
I have noticed my styles for the mailchimp are coming from this however mailchimp
say I do not have access to change this CSS file.我注意到我的 mailchimp 样式来自于此,但是mailchimp
说我无权更改此 CSS 文件。
My overall question which I am sure someone else must have faced before me:我确信其他人在我之前一定遇到过我的总体问题:
mailchimp
popup form?如何将 CSS 添加到我的mailchimp
弹出表单?Is it Mailchimp popup came out with <iframe>
tag? Mailchimp 弹出窗口是否带有<iframe>
标签? If yes I think you can't custom it directly with css.如果是,我认为您不能直接使用 css 自定义它。
1. Inject your css to iframe
by js. 1.通过js将你的css注入到iframe
。
How to Apply CSS to iFrame如何将 CSS 应用于 iFrame
2. Change to use mailchimp API integrate with your custom popup html/css. 2. 更改为使用 mailchimp API 与您的自定义弹出窗口 html/css 集成。 It might get a lot of effort but easy to maintenance.它可能需要很多努力,但易于维护。 (can ask me) (可以问我)
Mailchimp API DOC Mailchimp API 文档
MailChimp API 3.0 and WordPress HTTP API MailChimp API 3.0 和 WordPress HTTP API
GOOD LUCK.祝你好运。
CSS cannot target elements within an iframe from a different domain. CSS 无法定位来自不同域的 iframe 中的元素。 You can however use JS, but thats not a CSS answer :)但是,您可以使用 JS,但这不是 CSS 答案:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.