【发布时间】:2020-12-08 19:35:05
【问题描述】:
我在使用 Safari 中的 iOS 设备上的按钮时遇到问题,没有像在桌面设备和 Android 设备上那样应用背景颜色。 这是按钮上的 CSS 属性
export const Button = styled.button`
display: inline-block;
color: ${({ theme }) => theme.text.main};
margin-left: 8px;
padding: 0 15px;
height: 32px;
border-radius: 4px;
background-color: ${({ theme }) => theme.palette.main};
font-weight: 400;
line-height: 1.5;
font-size: 15px;
cursor: pointer;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
opacity: 1;
`
【问题讨论】:
标签: css reactjs safari mobile-safari