首页 > 解决方案 > Chrome 按钮上显示的字体颜色,但不是 Safari

问题描述

这个 WordPress 页面上有一个嵌入式表单(由第三方插件 Genoo 提供),我正在尝试重新设置样式。除了底部的提交按钮外,一切都很顺利。按钮应该有黑色背景的白色文本。

https://lfccworkforce.com/funding-options/fastforward/

它在 Chrome 中显示正常:

铬截图

但在 Safari 中它不会:

Safari 截图

我感谢大家的帮助!

e.genooForm {
all: unset;
}
.genooForm label {
font-size:.9em;
font-weight: bold;
font-family: Arial, Sans-Serif;
}

.genooForm input.ext-form-input {
border: solid 1px #757575;
width: 100%;
border-radius: 5px;
margin-bottom: 15px;
}

.gn-component--selected {
all: unset;
width: 30% !important;
margin: auto !important;
}

.gn-btn     {
all: unset;
text-align: center;
padding: 10px;
background: #000 !important;
color: #fff !important;
font-size: 1em !important;
font-weight: bold !important;
border-radius: 10px !important;
text-decoration: capitalize !important;
}

.gn-btn:hover {
background:#0176C0 !important;
}

.gn-generated .gn-form .gn-btn {
color: rgb(255, 255, 255)  !important;
}

标签: csswordpressforms

解决方案


@www139 有答案:

我建议删除 all:unset; 财产。只有 Safari 9.1 及更高版本支持它。Edge 根本不支持它。由于它将属性重置为初始值,因此 Safari 可能对该属性的解释与 Chrome 不同,并将按钮的颜色设置为默认值。


推荐阅读