在table表格中实现圆角效果
web DIV+CSS 2019-09-06 2301 0
关于本站

“最难不过坚持”

本人承接扒站仿站,php网站维护,病毒查杀,网站编辑,网站改版,html制作

有需要网站维护,改版,病毒查杀,网站编辑,网站备案,html制作等相关的工作可以联系我。
本人有多年相关工作经验,也可提供免费咨询,交个朋友。
有需要探讨问题的朋友,也可以加我微信,共同探讨!
微信:15011482830 QQ:408917339

6413921 2611 39
最新评论
https://jueru.net/
评 留言
:weixiao:
评 留言
:shuijiao: :weiqu: :zhenbang: :leng:
评 留言
:yiwen: :yiwen: :yiwen: :yiwen:
评 EasySass: could not generate CSS file. See Output panel for details.
这个业务逻辑多少都有点奇怪了,阅读浏览次数增值在新闻详情页的控制器方法里setInc,这怎么还写进模型事件里了。如果非要用onAfterRead也可以,把新闻文章的内容单独分出来一个news_content表,然后把它和news做关联,然后给news_content表的onAfterRead事件做增值处理,这样点进新闻页内查询到文章内容时才会触发它。
评 TP6模型事件-查询后onAfterRead不好用
文章标签更多
ThinkPHP (254)
Mysql (58)
DedeCms (33)
jQuery (67)
证件照 (1)
setInc (4)
setDec (4)
onclick (5)
打开边栏(ESC) 关闭边栏(ESC)

在table中设置border-radius发现不起作用,网上查找了一番,原因是border-collapse:collapse和border-radius不兼容。
设计图效果

from clipboard

代码实现效果:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        #table_wrap > table {
            font-size: 16px;
            text-align: center;
            margin: 0 auto;
            border-collapse: separate;
            border-spacing: 0;
            border: 2px #000;
        }

        table thead tr,table tbody tr {
            height: 50px;
            line-height: 50px;
            /*background-color: pink;*/
        }
        table tr th:first-child,table tr td:first-child {/*设置table左边边框*/
            border-left: 2px solid #eaeaea;
        }
        table tr th:last-child,table tr td:last-child {/*设置table右边边框*/
            border-right: 2px solid #eaeaea;
        }
        table tr td:first-child,
        table tr td:nth-child(2),
        table tr td:nth-child(3),
        table tr td:last-child{/*设置table表格每列底部边框*/
            border-bottom: 2px solid #eaeaea;
        }
        /*table tr:last-child td:first-child,
        table tr:last-child td:nth-child(2),
        table tr:last-child td:nth-child(3),
        table tr:last-child td:last-child{/!*设置table表格最后一列底部边框*!/
            border-bottom: 2px solid #000;
        }*/
        table tr th {
            background: #eaeaea;
        }
        table tr:first-child th:first-child {
            border-top-left-radius: 12px;
        }

        table tr:first-child th:last-child {
            border-top-right-radius: 12px;
        }
        table tr:last-child td:first-child {
            border-bottom-left-radius: 12px;
        }

        table tr:last-child td:last-child {
            border-bottom-right-radius: 12px;
        }

    </style>
</head>
<body>
<div id="table_wrap">
    <table class="table" width="800" cellspacing="0" cellpadding="0">
        <thead class="table_head">
        <tr>
            <th>头部1</th>
            <th>头部2</th>
            <th>头部3</th>
            <th>头部4</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>1内容1</td>
            <td>1内容2</td>
            <td>1内容3</td>
            <td>1内容4</td>
        </tr>
        <tr>
            <td>2内容1</td>
            <td>2内容2</td>
            <td>2内容3</td>
            <td>2内容4</td>
        </tr>
        <tr>
            <td>3内容1</td>
            <td>3内容2</td>
            <td>3内容3</td>
            <td>3内容4</td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>

版权声明:本篇文章来源于网络。 来源链接

相关推荐
css提示invalid property value
DIV+CSS | 2020-07-23 17664
网上复制了一段css代码,浏览器没有出现预定的样式,按F12打开调试模式,发现css属性前有个感叹号,鼠标经过提示“Invalid property value”无效的属性值,如图 应该是css有错误,后来发现css属性前的空格包含&emsp;“全角空格”,删了就可以了 复制空白粘贴到编辑器,然后切换到源...
css通过父元素选择子元素,选择第一个,第二个,最后一个,奇数偶数
DIV+CSS | 2017-07-27 7465
:first-child 选择器 选择属于其父元素的首个子元素的每个 <p> 元素,并为其设置样式: p:first-child { background-color:yellow; } 例子1 选择列表中的第一个 <li> 元素并设置其样式: li:first-child { backgroun...
评论:0条
评论加载中...
发表评论