gpt4 book ai didi

html - 将 CSS 按钮调整为 HTML 边框

转载 作者:行者123 更新时间:2023-11-28 05:40:32 27 4
gpt4 key购买 nike

我一直在做一个网站,我创建了几个按钮。最近我使用了 css “padding” 来调整按钮的大小,使其大小彼此相等。我想知道的是,有没有一种方法可以调整按钮的大小以适合表格边框,以便它在任何分辨率大小的浏览器中看起来都不错?

Here is a screenshot of my site so you guys know what you're looking at

最佳答案

button width:100%td padding: 0

table {
width: 200px;
}
td {
border: 1px solid;
padding: 0;
}
button {
width: 100%;
}
<table>
<tr>
<td>
<button>Button</button>
</td>
</tr>
</table>

关于html - 将 CSS 按钮调整为 HTML 边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37911262/

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