gpt4 book ai didi

移动设备上的 CSS box-shadow 小边框

转载 作者:行者123 更新时间:2023-11-28 08:39:56 25 4
gpt4 key购买 nike

我正在使用 box-shadow 来获得元素外部的颜色。在我的桌面上,这看起来不错,但在我的手机上,我看到了一个小边框,可能是我手机屏幕的高 PPI 造成的。请参见下面的屏幕截图。 enter image description here

代码

.container {
margin-left: auto;
margin-right: auto;
padding-left: 15px;
padding-right: 15px;
}
.container.main {
background-color: #fff;
}

.header-main{
height: 90px;
box-shadow: 0px -15px 0px 15px #009fe3;
}

.container-row{
position: relative;
background-color: #009fe3;
height: 90px;
}
<div class="container main">
<header class="header-main">
<div class="container-row">
Put your text here!
</div>
</header>
</div>

最佳答案

如果这些是您的问题,要摆脱边界吗?尝试:.header-main {
背景:#009fe3;
希望这些有所帮助。

关于移动设备上的 CSS box-shadow 小边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41221245/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com