-moz-appearance' is not supported by Chrome, Chrome Android, Edge, Safari, Safari on iOS. Add 'appearance' to support Chrome 84+, Chrome Android 84+, Edge 84+, Safari 15.4+, Safari on iOS 15.4+.怎么解决
时间: 2024-03-23 22:40:29 浏览: 832
这个问题是因为您使用了-moz-appearance属性,但它不被Chrome,Chrome Android,Edge,Safari和Safari on iOS等浏览器所支持。建议您使用appearance属性来代替-moz-appearance属性。
例如,如果您的CSS代码为:
```
button {
-moz-appearance: none;
appearance: none;
}
```
可以改为:
```
button {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
}
```
这样就可以兼容各种浏览器了。
相关问题
'-moz-appearance' is not supported by Chrome, Chrome Android, Edge, Safari, Safari on iOS. Add 'appearance' to support Chrome 84+, Chrome Android 84+, Edge 84+, Safari 15.4+, Safari on iOS 15.4+.
The `-moz-appearance` property is a vendor-specific CSS property used to control the appearance of form controls in Firefox. It is not supported by Chrome, Chrome Android, Edge, Safari, Safari on iOS.
To support the mentioned browsers, you can add the `appearance` property along with the appropriate vendor prefixes. Here's an example:
```css
/* For Firefox */
-moz-appearance: value;
/* For Chrome, Chrome Android, Edge */
-webkit-appearance: value;
appearance: value;
/* For Safari, Safari on iOS */
-webkit-appearance: value;
```
Replace `value` with the desired appearance value that matches your requirements.
By adding these prefixes, you can provide cross-browser support for controlling the appearance of form controls. Remember to use appropriate fallbacks or alternative styling for browsers that do not support these properties.
If you have any further questions, feel free to ask!
-moz-appearance is not supported by Chrome, Chrome Android, Edge. Add appearance to support Chrome 84+, Chrome Android 84+, Edge 84+.
`-moz-appearance` 是 Mozilla Firefox 浏览器特有的样式属性,用于控制表单控件的外观风格,如按钮、滑块等。然而,这个属性并不被 Google Chrome、Chrome for Android 或者 Microsoft Edge 的早期版本支持。
为了提供跨浏览器的兼容性,并让您的样式在 Chrome 84+、Chrome for Android 84+ 和 Edge 84+ 及以上版本生效,您应该使用标准的 `appearance` 属性。`appearance` 允许设置元素呈现为操作系统默认的外观,如果浏览器支持,它会接管 `-moz-appearance` 的功能。
例如,如果您想让一个按钮看起来像原生的提交按钮,您可以这样做:
```css
button {
-webkit-appearance: button; /* For Chrome and Safari (WebKit-based browsers) */
appearance: button; /* For modern browsers, including Edge */
}
```
阅读全文