gpt4 book ai didi

html - 按钮样式 - 忽略 css

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

有没有办法在创建特定按钮时忽略 Google CSS 样式?这是我的 jsfiddle ,我想将按钮宽度更改为 5 px,由于外部 CSS 而被忽略

HTML:

<input type="submit">

CSS:

input[type="submit"] {
height: 25px;
width: 5px;
border: 0;
-webkit-appearance: none;
}

最佳答案

如果您在 google 样式表之后加载 CSS,您可以使用您正在使用的选择器覆盖样式。谷歌应用 min-width: 72px 如果您希望宽度为 5px

,则需要覆盖它

<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">
<style>
input[type="submit"] {
height: 25px;
width: 5px;
border: 2px dotted red;
-webkit-appearance: none;
background: green;
color: white;
min-width: 0;
}
</style>
<input type="submit">

关于html - 按钮样式 - 忽略 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44609666/

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