表 td 的边框间距仅在部分之间

时间:2020-12-29 13:14:35

标签: html css html-table css-selectors

我有一个包含 3 个部分的表格:- 艺术品、条形码和文本区域,其标题如下:-

         <thead>
            <tr>
                <th scope="col"></th>
                <th scope="col" colSpan={7}>Artwork Area</th>
                <th scope="col" colSpan={8}>Barcode Area</th>
                <th scope="col" colSpan={8}>Plain Text Area</th>
                <th scope="col"></th>
            </tr>
            <tr className='custom-tr'>
                <th scope="col">#</th>
                <th scope="col">Name</th>
                <th scope="col">X</th>
                <th scope="col">Y</th>
                <th scope="col">Rotate</th>
                <th scope="col">Scale</th>
                <th scope="col" className='same'>Flip</th>
                <th scope="col" className='same'>Flop</th>
                <th scope="col">Text</th>
                <th scope="col">X</th>
                <th scope="col">Y</th>
                <th scope="col">Rotate</th>
                <th scope="col">Scale</th>
                <th scope="col" className='same'>Flip</th>
                <th scope="col" className='same'>Flop</th>
                <th scope="col" className='same'>External</th>
                <th scope="col">Text</th>
                <th scope="col">Type</th>
                <th scope="col">X</th>
                <th scope="col">Y</th>
                <th scope="col">Rotate</th>
                <th scope="col">Scale</th>
                <th scope="col" className='same'>Flip</th>
                <th scope="col" className='same'>Flop</th>
                <th scope="col"></th>
            </tr>
        </thead>

我想在节之间放置一个空格。即,仅在它构成的 cols 集的第一个 td 之前和之后。我尝试使用 border-spacing 和 margin 属性,但这没有帮助。

1 个答案:

答案 0 :(得分:0)

尝试在第一个 <th> 之前和最后一个 <th> 之后创建一个空的 border: none,并按预期设置 <th style="border: none; width: 100px;"></th> 属性和宽度范围。

<块引用>

exports["Bool"]["true"] = a => a["true"](); exports["Bool"]["false"] = a => a["false"]();

相关问题