gpt4 book ai didi

javascript - 如何在表格单元格之间添加空间?

转载 作者:行者123 更新时间:2023-11-30 11:07:41 25 4
gpt4 key购买 nike

我正在使用 bootstrap 密码输入插件来执行此操作,这是演示页面 http://fkranenburg.github.io/bootstrap-pincode-input/

如何将片段中的元素更改为这样的内容

_ _ _ _ _ _ 

我想要每个 td 之间有一些间隙,添加边框间距似乎不起作用?

.pincode-input-container {
display: inline-block;
}

.pincode-input-container.touch .touchwrapper.touch6 {
width: 175px;
}

.pincode-input-text, .form-control.pincode-input-text {
width: 35px;
float: left;
}

.pincode-input-container.touch .touchwrapper {
position: relative;
height: 34px;
margin-right: 5px;
overflow: hidden;
}

.pincode-input-container.touch .touchwrapper .pincode-input-text {
position: absolute;
top: 0px;
left: 0px;
right: 0px;
width: 100%;
display: block;
background-color: transparent;
background: transparent;
letter-spacing: 20px;
}

.pincode-input-container.touch .touchwrapper .touchtable {
width: 100%;
height: 100%;
table-layout: fixed;
}

.pincode-input-container.touch .touchwrapper .touchtable td {
border-right: 1px solid #ccc;
}
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="https://raw.githubusercontent.com/fkranenburg/bootstrap-pincode-input/master/css/bootstrap-pincode-input.css" rel="stylesheet"/>
<script src="https://raw.githubusercontent.com/fkranenburg/bootstrap-pincode-input/master/js/bootstrap-pincode-input.js"></script>

<div class="pincode-input-container touch">
<div class="touchwrapper touch6"><input type="number" inputmode="numeric" placeholder="" maxlength="6" autocomplete="off" class="form-control pincode-input-text">
<table class="touchtable">
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td class="last"></td>
</tr>
</tbody>
</table>
</div>
<div class="text-danger pincode-input-error"></div>
</div>

最佳答案

这似乎可以解决问题:

table {
border-spacing: 10px;
border-collapse: separate;
}

这就是您要找的东西?

关于javascript - 如何在表格单元格之间添加空间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55006808/

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