gpt4 book ai didi

html - CSS 显示表 + SPAN 错误

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

我有这个例子: Fiddle link

使用 display: table, display: table-cell, display: table-row 的表格

我需要在

之前添加一个 标记,但是我的表结构中断

有什么想法吗?谢谢

例子:

<fieldset>
<span>
<p>
<label>First Name: </label>
<input type="text" />
</p>
</span>
<span>
<p>
<label>Second Name: </label>
<input type="text" />
</p>
</span>
<span>
<p>
<label>Country: </label>
<select>
<option>Choose</option>
</select>
</p>
</span>
<span>
<p>
<label>Age: </label>
<select>
<option>Choose</option>
</select>
</p>
</span>
</fieldset>

最佳答案

如果您要显示为表格,那么所有元素都应遵循相同的结构属性

fieldset span {
display: table-row-group;
}

fiddle :http://jsfiddle.net/qQ3xJ/

关于html - CSS 显示表 + SPAN 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18487518/

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