【发布时间】:2019-12-20 01:22:32
【问题描述】:
以下 CSS/HTML 存在问题 - 按钮在桌面、iPhone 和 Android 移动设备上显示正常,但在测试 iPad 时,按钮背景颜色隐藏/不可见。与按钮和按钮文本的 CSS 交互仍然可见,但缺少背景颜色。
代码如下:
.button-wrap {
display: flex;
align-items: center;
justify-content: center;
margin-top: 7%;
cursor: pointer;
color: #E98191;
}
.button {
width: 100px;
display: inline-flex;
align-items: center;
padding: 0 26px;
height: 50px;
background-color: rgba(255, 255, 255) !important;
border-radius: 100px;
margin-top: 20px;
margin: 2%;
-webkit-appearance: none;
box-shadow: 0 2px 3px 0px rgba(0, 0, 0, 0.005);
transition: .2s all;
}
.button span {
margin-left: auto;
margin-right: auto;
}
.button-wrap:hover .button {
filter: blur(3px);
opacity: .5;
transform: scale(.98);
box-shadow: none;
}
.button-wrap:hover .button:hover {
transform: scale(1);
filter: blur(0px);
opacity: 1;
box-shadow: 0 8px 20px 0px rgba(0, 0, 0, 0.125);
}
<div class="button-wrap">
<div class="button">
<span>Yes</span>
</div>
<div class="button">
<span>No</span>
</div>
</div>
【问题讨论】:
-
iPad 上的 iOS 版本是什么?和你测试的 iPhone 上的一样吗?
-
在ipad上看起来不错,提供的代码没有问题,您可以查看您的
media queries或提供有问题的代码吗?