gpt4 book ai didi

html - radio button.checkbox 在 materialize css 中的表内不可见

转载 作者:行者123 更新时间:2023-11-27 22:58:15 25 4
gpt4 key购买 nike

如何在表格中包含单选按钮或复选框?

<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
</head>
<body>
<table>
<thead><th>radio button</thead>
<tbody><tr><td><input type="radio" value="r1"></td></tr></tbody>
</table>
</body>
</html>

最佳答案

如 F12 opacity:0 什么意思是你的 radio 是不可见的:

enter image description here

作为materialize doc你必须像下面那样使用 radioclass="with-gap":

  <p>
<label>
<input class="with-gap" name="yourName" type="radio"/>
<span>yout text</span>
</label>
</p>

查看工作代码

<html>

<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
</head>

<body>
<table>
<thead>
<th>radio button</thead>
<tbody>
<tr>
<td>
<p>
<label>
<input class="with-gap" name="group3" type="radio" />
<span>Red</span>
</label>
</p>
</td>
</tr>
</tbody>
</table>
</body>

</html>

关于html - radio button.checkbox 在 materialize css 中的表内不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54236190/

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