删除 WordPress 中 ConvertKit 表单的默认样式
Remove default styles on ConvertKit form in WordPress
一个有一个 ConvertKit 表单,它是使用 ConvertKit plugin 添加的,并按如下方式上传到小部件上
应用一些样式后,当我登录时,表单如下所示
但是,当我注销时,加载了一些默认样式,表单最终看起来像这样
如何删除 ConvertKit 默认样式?
可能有不同的方法来删除 ConvertKit 应用的默认样式。我尝试了以下方法,但没有成功:
查看前端的表单,发现在一个表单里面有一个class "seva-form formkit-form"
,除了两个div
,还有一个style
元素.,如下
<form class="seva-form formkit-form">
<div class="formkit-background">...</div>
<div data-style="minimal">...</div>
<style>...</style>
正如我所见,删除样式块 <div data-style="minimal">...</div>
解决了表单的问题,尝试按照 应用 .formkit-form div[data=style="minimal"] { display: none; }
,但它没有解决问题.
根据我们通过评论讨论的您不断变化的要求:
form.formkit-form[data-uid="3624b8b144"] {
border: transparent;
margin: 0 auto; /* To center the form, you can also use flexbox centering */
}
/* I had to increase the specificity of the below selector because there are other selectors acting on it */
form.formkit-form div.formkit-powered-by-convertkit-container a.formkit-powered-by-convertkit {
display: none; /* To hide the copyright but check how their licensing works */
}
.formkit-guarantee a {
color: #fff; /* To change the color of privacy link */
}
输出:
一个有一个 ConvertKit 表单,它是使用 ConvertKit plugin 添加的,并按如下方式上传到小部件上
应用一些样式后,当我登录时,表单如下所示
但是,当我注销时,加载了一些默认样式,表单最终看起来像这样
如何删除 ConvertKit 默认样式?
可能有不同的方法来删除 ConvertKit 应用的默认样式。我尝试了以下方法,但没有成功:
查看前端的表单,发现在一个表单里面有一个class "seva-form formkit-form"
,除了两个div
,还有一个style
元素.,如下
<form class="seva-form formkit-form">
<div class="formkit-background">...</div>
<div data-style="minimal">...</div>
<style>...</style>
正如我所见,删除样式块 <div data-style="minimal">...</div>
解决了表单的问题,尝试按照 .formkit-form div[data=style="minimal"] { display: none; }
,但它没有解决问题.
根据我们通过评论讨论的您不断变化的要求:
form.formkit-form[data-uid="3624b8b144"] {
border: transparent;
margin: 0 auto; /* To center the form, you can also use flexbox centering */
}
/* I had to increase the specificity of the below selector because there are other selectors acting on it */
form.formkit-form div.formkit-powered-by-convertkit-container a.formkit-powered-by-convertkit {
display: none; /* To hide the copyright but check how their licensing works */
}
.formkit-guarantee a {
color: #fff; /* To change the color of privacy link */
}
输出: