首页 > 解决方案 > 仅部分之间的表 td 的边框间距

问题描述

我有一个包含 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>

我想在sections.ie之间放置一个空格,仅在它构成的cols集合的第一个和最后一个td之前和之后。我尝试使用边框间距和边距属性,但这没有帮助。

标签: htmlcsshtml-tablecss-selectors

解决方案


<th>尝试在 first 和 last 之前创建一个空<th>,并按照您的预期设置border: none属性和宽度范围。

<th style="border: none; width: 100px;"></th>.


推荐阅读