html - 如何替换 mailchimp CSS 嵌入代码中的按钮样式?
问题描述
我不知道如何在 Mailchimp 的嵌入 CSS 中更改按钮样式或位置,如下所示:
<!-- Begin Mailchimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet"
type="text/css">
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; }
/* Add your own Mailchimp form style overrides in your site stylesheet or in this style
block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file.
*/
</style>
<div id="mc_embed_signup">
<form action="https://7grainarmy.us2.list-manage.com/subscribe/post?
u=e6f00f0dccb61295ecf1b51c4&id=ebaa28ce5c" method="post" id="mc-embedded-subscribe-form"
name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<div class="mc-field-group">
<label for="mce-EMAIL">email address <span class="asterisk">*</span>
</label>
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
</div>
<div id="mce-responses" class="clear">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div> <!-- real people should not fill this in and expect good things - do not remove
this or risk form bot signups-->
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text"
name="b_e6f00f0dccb61295ecf1b51c4_ebaa28ce5c" tabindex="-1" value=""></div>
<div class="clear"><input type="submit" value="Sign up" name="subscribe" id="mc-embedded-
subscribe" class="button"></div>
</div>
</form>
</div>
-- 首先,我想将按钮移动到中心,并且我想用可点击的图像替换按钮,因为我有一个我想使用的风格化按钮。我怎样才能做到这一点?我在 Wordpress 上使用 Slider Revolution 插件,这是我正在开发的网站:http: //laurenb9.sg-host.com/
谢谢!
解决方案
下面添加自定义 css 以使按钮居中,并在何处添加 bg 样式的注释:
<!-- Begin Mailchimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet"
type="text/css">
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; }
/* Add your own Mailchimp form style overrides in your site stylesheet or in this style
block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file.
*/
#mc_embed_signup .button {
/* center button */
margin: auto;
display: block;
/* add your other bg override styles here */
}
</style>
<div id="mc_embed_signup">
<form action="https://7grainarmy.us2.list-manage.com/subscribe/post?
u=e6f00f0dccb61295ecf1b51c4&id=ebaa28ce5c" method="post" id="mc-embedded-subscribe-form"
name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<div class="mc-field-group">
<label for="mce-EMAIL">email address <span class="asterisk">*</span>
</label>
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
</div>
<div id="mce-responses" class="clear">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div>
<!-- real people should not fill this in and expect good things - do not remove
this or risk form bot signups-->
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text"
name="b_e6f00f0dccb61295ecf1b51c4_ebaa28ce5c" tabindex="-1" value=""></div>
<div class="clear"><input type="submit" value="Sign up" name="subscribe" id="mc-embedded-
subscribe" class="button"></div>
</div>
</form>
</div>
推荐阅读
- python - 在python烧瓶中使用游标对postgres查询进行分页
- python - 如何使用python gui将带有按钮的函数链接到输入框?
- git - 不能用当前ip地址git push,怎么办?
- javascript - 在 JavaScript 中使用 IF 处理复选框状态
- google-chrome - 用于批量域的 Web 浏览器插件
- javascript - 将本机脉冲图像反应为 instagram
- amazon-web-services - 在 AWS Glue 中读写 MYSQL
- javascript - 是否有 HTML5 验证 API 将元素的状态设置为无效?
- java - 如何获得在 Java 中实现特定接口的正确枚举?
- angular - 将员工电话从表格添加到表格