gpt4 book ai didi

html - 将样式应用于放置在另一个表中的特定子表

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

我需要给放在另一个表第三行的表应用样式,

<html>

<head>
<title>HTML Table</title>
</head>

<body>
<table class="wizard-ux">
<tbody>
<tr>
<table>
<tr>
<td>test Table 2</td>
<td>test Table 2</td>
</tr>
</table>
</tr>
<tr>
<table>
<tr>
<td>test Table 2</td>
<td>test Table 2</td>
</tr>
</table>
</tr>
<tr>
<td>
<table>
<tr>
<td>Save (Width has to be 90%)</td>
<td>Cancel (Width has to be 10%)</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</body>

</html>

因为这是 asp.net 向导,所以我没有子表的 ID 或类,唯一的引用是父表的“wizard-ux”。我需要通过 CSS 将第一列的宽度设置为 90%,将第二列的宽度设置为 10%,

有人可以为此推荐一个 CSS,

提前致谢,

最佳答案

试试下面的 CSS

.wizard-ux tr:last-of-type table td:first-of-type
{
width:90%;

}
.wizard-ux tr:last-of-type table td:last-of-type
{
width:10%;

}

关于html - 将样式应用于放置在另一个表中的特定子表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52387773/

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