gpt4 book ai didi

css - 为什么两个输入的背景颜色不同?

转载 作者:太空宇宙 更新时间:2023-11-03 21:01:40 25 4
gpt4 key购买 nike

可以看到,我没有指定input的背景色,一个是灰色,一个是白色,为什么?

<style>
.baken {
border:1px solid #888888;
font-family:Trebuchet MS,Helvetica,sans-serif;
font-size:130%;
font-weight:bold;
margin:3px;
padding:2px;
}

</style>


<input type="button" class="baken" value="answer your question"/>

<input type="button" value="hello button"/>

最佳答案

通过在按钮上指定边框,它会导致按钮上默认的特定于操作系统的样式被删除,将其恢复为某些默认值(看起来是灰色的)

您可以通过从您的类中删除 border 来查看实际效果。

关于css - 为什么两个输入的背景颜色不同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1040955/

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