gpt4 book ai didi

html - 背景灰色的 CSS 问题导致蓝色按钮具有白色轮廓

转载 作者:太空宇宙 更新时间:2023-11-04 03:06:24 32 4
gpt4 key购买 nike

picture of both buttons demonstrating the white space

如图所示,我标有“新任务”和“新笔记”的按钮完全没问题,但由于灰色背景,提交和取消有一些奇怪的白色阴影阴影?

所以我的猜测是我的按钮蓝色与背景样式相结合一定会导致问题吗?

下面:屏幕上按钮的 CSS 样式(目前还没有影响此页面的 JS),HTML 非常基础。

.btn {
background: #3498db;
background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
background-image: -moz-linear-gradient(top, #3498db, #2980b9);
background-image: -ms-linear-gradient(top, #3498db, #2980b9);
background-image: -o-linear-gradient(top, #3498db, #2980b9);
background-image: linear-gradient(to bottom, #3498db, #2980b9);
-webkit-border-radius: 28;
-moz-border-radius: 28;
border-radius: 28px;
color: #ffffff;
padding: 10px 20px 10px 20px;
text-decoration: none;
outline-color: #808080;
font-family:Arial, Tahoma, Verdana, "Times New Roman", sans-serif;
font-size:12px;
font-weight:normal;
}

.btn:hover {
background: #3cb0fd;
background-image: -webkit-linear-gradient(top, #3cb0fd, #3498db);
background-image: -moz-linear-gradient(top, #3cb0fd, #3498db);
background-image: -ms-linear-gradient(top, #3cb0fd, #3498db);
background-image: -o-linear-gradient(top, #3cb0fd, #3498db);
background-image: linear-gradient(to bottom, #3cb0fd, #3498db);
text-decoration: none;
}

谢谢大家!

最佳答案

尝试放置 border-style: none

您的代码

.btn {
border-style: none; // just add this one :)
background: #3498db;
background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
background-image: -moz-linear-gradient(top, #3498db, #2980b9);
background-image: -ms-linear-gradient(top, #3498db, #2980b9);
background-image: -o-linear-gradient(top, #3498db, #2980b9);
background-image: linear-gradient(to bottom, #3498db, #2980b9);
-webkit-border-radius: 28;
-moz-border-radius: 28;
border-radius: 28px;
color: #ffffff;
padding: 10px 20px 10px 20px;
text-decoration: none;
outline-color: #808080;
font-family:Arial, Tahoma, Verdana, "Times New Roman", sans-serif;
font-size:12px;
font-weight:normal;
}

.btn:hover {
background: #3cb0fd;
background-image: -webkit-linear-gradient(top, #3cb0fd, #3498db);
background-image: -moz-linear-gradient(top, #3cb0fd, #3498db);
background-image: -ms-linear-gradient(top, #3cb0fd, #3498db);
background-image: -o-linear-gradient(top, #3cb0fd, #3498db);
background-image: linear-gradient(to bottom, #3cb0fd, #3498db);
text-decoration: none;
}

关于html - 背景灰色的 CSS 问题导致蓝色按钮具有白色轮廓,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30380352/

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