css - Chrome 按钮上显示的字体颜色,但不是 Safari
问题描述
这个 WordPress 页面上有一个嵌入式表单(由第三方插件 Genoo 提供),我正在尝试重新设置样式。除了底部的提交按钮外,一切都很顺利。按钮应该有黑色背景的白色文本。
https://lfccworkforce.com/funding-options/fastforward/
它在 Chrome 中显示正常:
但在 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;
}
解决方案
@www139 有答案:
我建议删除 all:unset; 财产。只有 Safari 9.1 及更高版本支持它。Edge 根本不支持它。由于它将属性重置为初始值,因此 Safari 可能对该属性的解释与 Chrome 不同,并将按钮的颜色设置为默认值。
推荐阅读
- python-3.x - 将选择限制为用户属性
- c++ - 非限定名称何时/为什么/如何在依赖库中查找?
- node.js - 使用 Angular 从 MongoDB 中搜索文档
- html - 如何从 Wordpress 获取视频(iframe) - WPGraphQL 无头 CMS
- python - 使用 Python 和 Pandas 从 Oracle 获取数据的性能问题
- c - select() 在未连接的套接字上返回 1(不一致)
- websocket - Cloudflare 阻止 websocket 连接
- javascript - 在画布上绘制三角形,当所有 3 个边都给定时,但将其移动到中间并旋转它(Javascript)
- html - Android Webview 视频 - net::ERR_BLOCKED_BY_RESPONSE
- javascript - 如何从我的 firebase 数据库中检索数据?