javascript - 求教 怎么把边框去掉
迷茫
迷茫 2017-04-11 11:17:09
[JavaScript讨论组]

项目中要用到dataTable,且不需要默认的上下边框,请问怎么去掉。
我试过在table中加行间样式style="border:0;",但去掉了下面的

<body>
<table id="example" class="display" cellspacing="0" width="100%" style="border:0;">
    <thead>
    <tr>
        <th>Name</th>
        <th>Position</th>
        <th>Office</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>Tiger Nixon</td>
        <td>System Architect</td>
        <td>Edinburgh</td>
    </tr>
    <tr>
        <td>Garrett Winters</td>
        <td>Accountant</td>
        <td>Tokyo</td>
    </tr>
    <tr>
        <td>Ashton Cox</td>
        <td>Junior Technical Author</td>
        <td>San Francisco</td>
    </tr>
    </tbody>
</table>
<script>
    $(document).ready(function() {
        $('#example').DataTable();
    } );
</script>
</body>

我尝试在tbody中加border:none; 没用, 遂尝试加一个明显的边框style="border:20px solid red;",发现被隐藏在表格下面

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

全部回复(1)
阿神
选择器{
    border-top: none !important;
    border-bottom: none !important;
}
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号