<legend id='0L2Uj'><style id='0L2Uj'><dir id='0L2Uj'><q id='0L2Uj'></q></dir></style></legend>

    <small id='0L2Uj'></small><noframes id='0L2Uj'>

      <bdo id='0L2Uj'></bdo><ul id='0L2Uj'></ul>
    <tfoot id='0L2Uj'></tfoot>
      <i id='0L2Uj'><tr id='0L2Uj'><dt id='0L2Uj'><q id='0L2Uj'><span id='0L2Uj'><b id='0L2Uj'><form id='0L2Uj'><ins id='0L2Uj'></ins><ul id='0L2Uj'></ul><sub id='0L2Uj'></sub></form><legend id='0L2Uj'></legend><bdo id='0L2Uj'><pre id='0L2Uj'><center id='0L2Uj'></center></pre></bdo></b><th id='0L2Uj'></th></span></q></dt></tr></i><div id='0L2Uj'><tfoot id='0L2Uj'></tfoot><dl id='0L2Uj'><fieldset id='0L2Uj'></fieldset></dl></div>

        CSS表格样式:圆角,隔行,变色的具体实现

        实现CSS表格样式包括圆角、隔行、以及变色的步骤如下:
          <tfoot id='7TEBY'></tfoot>

            <bdo id='7TEBY'></bdo><ul id='7TEBY'></ul>

            • <small id='7TEBY'></small><noframes id='7TEBY'>

            • <legend id='7TEBY'><style id='7TEBY'><dir id='7TEBY'><q id='7TEBY'></q></dir></style></legend>
                  <i id='7TEBY'><tr id='7TEBY'><dt id='7TEBY'><q id='7TEBY'><span id='7TEBY'><b id='7TEBY'><form id='7TEBY'><ins id='7TEBY'></ins><ul id='7TEBY'></ul><sub id='7TEBY'></sub></form><legend id='7TEBY'></legend><bdo id='7TEBY'><pre id='7TEBY'><center id='7TEBY'></center></pre></bdo></b><th id='7TEBY'></th></span></q></dt></tr></i><div id='7TEBY'><tfoot id='7TEBY'></tfoot><dl id='7TEBY'><fieldset id='7TEBY'></fieldset></dl></div>
                    <tbody id='7TEBY'></tbody>

                  实现CSS表格样式包括圆角、隔行、以及变色的步骤如下:

                  1. 圆角表格样式

                  使用CSS的border-radius属性可以实现表格的圆角效果。

                  示例代码如下:

                  table {
                    border-collapse: collapse;
                  }
                  table, td, th {
                    border: 1px solid #999;
                    border-radius: 6px;
                    padding: 10px;
                  }
                  

                  这段代码中,我们首先将表格边框合并,并设置了边框的宽度和颜色。然后通过border-radius属性设置元素的圆角半径,这里我们设置了6px的圆角效果。最后给单元格添加padding属性,设置单元格内容和边框的距离。

                  2. 隔行样式

                  可以使用伪类选择器:nth-child()来给表格隔行添加样式。

                  示例代码如下:

                  tr:nth-child(odd) {
                    background-color: #f1f1f1;
                  }
                  

                  这段代码中,我们首先使用伪类选择器:nth-child()来获取表格中每一行的奇数行,然后设置了行的背景颜色为#f1f1f1。

                  3. 变色样式

                  可以使用伪类选择器:hover来实现鼠标悬停时的变色效果。

                  示例代码如下:

                  tr:hover {
                    background-color: #ddd;
                  }
                  

                  这段代码中,我们使用伪类选择器:hover来获取鼠标悬停在表格行上时的效果,然后设置了行的背景颜色为#ddd。

                  综上,我们可以将以上三个样式合并到一起,实现完整的CSS表格样式代码如下:

                  table {
                    border-collapse: collapse;
                  }
                  table, td, th {
                    border: 1px solid #999;
                    border-radius: 6px;
                    padding: 10px;
                  }
                  tr:nth-child(odd) {
                    background-color: #f1f1f1;
                  }
                  tr:hover {
                    background-color: #ddd;
                  }
                  

                  这段代码包含了圆角、隔行以及变色三个样式,可以实现美观的CSS表格样式。

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  下面是“背景图片自适应浏览器分辨率大小并自动拉伸全屏”的完整攻略。
                  下面是详细讲解“简单但很实用的5个CSS属性”的完整攻略:
                  以下是兼做美工之导航条制作过程分享的完整攻略:
                  JS 控制 CSS 样式表的方式主要有两种:通过修改样式属性来修改元素样式,以及通过切换 CSS 类名来切换元素样式。下面分别给出具体的步骤和示例说明。
                  实现首页动态视频背景,可以使用HTML5的video标签,下面是具体的示例代码和操作步骤:
                      <tbody id='hnZn4'></tbody>
                  1. <legend id='hnZn4'><style id='hnZn4'><dir id='hnZn4'><q id='hnZn4'></q></dir></style></legend>
                      <bdo id='hnZn4'></bdo><ul id='hnZn4'></ul>
                      • <small id='hnZn4'></small><noframes id='hnZn4'>

                      • <i id='hnZn4'><tr id='hnZn4'><dt id='hnZn4'><q id='hnZn4'><span id='hnZn4'><b id='hnZn4'><form id='hnZn4'><ins id='hnZn4'></ins><ul id='hnZn4'></ul><sub id='hnZn4'></sub></form><legend id='hnZn4'></legend><bdo id='hnZn4'><pre id='hnZn4'><center id='hnZn4'></center></pre></bdo></b><th id='hnZn4'></th></span></q></dt></tr></i><div id='hnZn4'><tfoot id='hnZn4'></tfoot><dl id='hnZn4'><fieldset id='hnZn4'></fieldset></dl></div>
                          <tfoot id='hnZn4'></tfoot>