gpt4 book ai didi

css - 默认浏览器按钮背景颜色

转载 作者:技术小花猫 更新时间:2023-10-29 11:27:50 24 4
gpt4 key购买 nike

查看这些按钮:

enter image description here

它们没有样式,看起来很不错(第二个是鼠标悬停)。

我能否以某种方式保持它们的外观,但更改背景颜色?

如果我通过 CSS 的 background-color 属性做到这一点,我会得到这个:

enter image description here

它看起来不像其他的(它不是圆形的,颜色很普通,没有内发光)...

最佳答案

每个浏览器都有自己的样式。但是使用 css 你可以实现它。检查以下内容:

input {-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.16, rgb(207,207,207)),
color-stop(0.79, rgb(252,252,252))
);
background-image: -moz-linear-gradient(
center bottom,
rgb(207,207,207) 16%,
rgb(252,252,252) 79%
);
padding:3px;
border:1px solid #000;}

更新

css 按钮的更新版本,带有 :hover 和来自 @xec 在评论中发布的伟大网站的渐变。

演示: http://jsfiddle.net/Ekf5b/1

有用的梯度生成器:http://gradients.glrzad.com/

一些附加信息:第一步是添加圆 Angular 。要在 ie 中设置圆 Angular ,您可以使用 css3pie .然后使用任何提到的工具添加渐变。最后,出于显而易见的原因,我添加了 padding,并添加了 border 来覆盖浏览器的默认值。

关于css - 默认浏览器按钮背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6696432/

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