gpt4 book ai didi

css - 如何从 Firefox 中的按钮中删除默认填充?

转载 作者:行者123 更新时间:2023-11-28 08:41:04 24 4
gpt4 key购买 nike

<分区>

我在按钮内有一个 span 元素。 span 有背景颜色,但我无法让它填充 Firefox 中的按钮,这在 Chrome 和 IE 中没问题。

我看过两个类似的问题,但他们的回答似乎并没有为我解决这个问题。

这是我的问题的精简版:

div {
height: 300px;
width: 300px;
background-color: red;
}
button {
padding: 0px;
margin: 0px;
color: inherit;
border: 0px none;
background-color: blue;
}
span {
background-color: yellow;
display: block;
width: 100%;
}
<div>
<button><span>span</span></button>
</div>

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