在以下 页面 中:
我有一个灰色按钮(请参阅第一本书的部分,它是页面中唯一的灰色按钮)但它应该是蓝色的。我从邮件服务中剪切并粘贴代码(见下文)。属性:背景色:#47abd5;不起作用。为什么?
<style>
#mlb2-3734193 button.ml-subscribe-button {
cursor: pointer;
font-family: Open Sans!important;
font-size: 24px !important;
height: 60px;
width: 250px;
background-color: #47abd5;
color: #ffffff!important;
border: none;
border-radius: 2px;
padding: 0px 24px;
}
</style>
<link href="https://fonts.googleapis.com/css?family=Open+Sans& subset=latin,latin-ext" rel="stylesheet" type="text/css">
<form id="mlb2-3734193" action="//app.mailerlite.com/webforms/popup/z0d1n7" data-code="z0d1n7" data-id="243593" target="_blank">
<div stylclass="button-preview">
<button style="background-color: #47abd5;" type="submit" class="ml-subscribe-button">Iscriviti</button>
</div>
</form>
<script type="text/javascript" src="//static.mailerlite.com/js/w/button.min.js?veb3acdd46bf692c067c6a9fe9fbc07d6"></script>
原文由 Salvatore D‘angelo 发布,翻译遵循 CC BY-SA 4.0 许可协议
因为这个 css 被应用到你的按钮。
我想有一个背景渐变会覆盖您的样式。正如@Turnip 建议将其更改为 background 而不是 background-colour 并且它会起作用