表格作业<tr><td><th>标签作用以及css属性值学习

原创 2018-11-02 11:32:05 528
摘要:<DOCTYPE! html><html><head><style type="text/css">*{margin: 0 auto; padding: 0px; text-decoration: none;}.header{ width: 100%; background: #7d7d7d; height: 60px;}.hea
<DOCTYPE! html>
<html>
<head>

<style type="text/css">
*{margin: 0 auto; padding: 0px; text-decoration: none;}
.header{ width: 100%; background: #7d7d7d; height: 60px;}
.header ul{width: 1200px; height: 60px; background: #7d7d7d;}
.header ul li{width: 100px;height: 60px; background: #7d7d7d;text-align: center; list-style: none; float: left; line-height: 60px; }
.header ul li:hover{ background:#2b2b2b; }
.header ul li a{color: #ffffff; font-size: 14px; display: inline-block; height: 60px; width: 100px; line-height: 60px; text-align: center;}
.header ul li ul{display: none; width: 100px;}
.header ul li:hover .nav_ul{ display: block; }
.header ul li ul li{height: 40px; width: 100px; background: #7d7d7d; line-height: 40px; }
.header ul li ul li a{color: #ffffff; font-size: 14px; display: inline-block; height: 40px; width: 100px; line-height: 40px; text-align: center;}
.table{ width: 1200px; height: 600px; margin: auto; background: #ccc; margin-top:100px;  }
table{ border:1px solid pink; }
table tr td {height: 100px; background: #fff; border:1px solid #ccc;padding: 0px 15px; text-align: center;}
</style>
</head>
<body>
   <div class="header">
     <ul>
       <li><a href="">首页</a></li>
       <li><a href="">关于我们</a>
          <ul class="nav_ul">
            <li><a href="">企业文化</a></li>
            <li><a href="">业务团队</a></li>
            <li><a href="">发展历程</a></li>
          </ul>
       </li>
       <li><a href="">售卖产品</a></li>
       <li><a href="">服务跟随</a></li>
       <li><a href="">新闻动态</a>
          <ul class="nav_ul">
            <li><a href="">企业动态</a></li>
            <li><a href="">行业新闻</a></li>
            <li><a href="">产品更新</a></li>
          </ul>
       </li>
       <li><a href="">业务合作</a></li>
       <li><a href="">联系我们</a></li>
     </ul>
     </ul>
   </div>
<div class="table">
   <table>
    <tr>
    <th>表头</th>
    <th>表头</th>
    <th>表头</th>
    <th>表头</th>
    </tr>
     <tr>
        <td colspan="4">合并一行</td>
     </tr>
     <tr>
        <td rowspan="4">合并一列</td>
        <td>第二行第二列</td>
        <td>第二行第三列</td>
        <td>第二行第四列</td>
     </tr>
     <tr>
        <td>第三行第一列</td>
        <td>第三行第二列</td>
        <td>第三行第三列</td>
     </tr>
      <tr>
        <td>第四行第一列</td>
        <td>第四行第二列</td>
        <td>第四行第三列</td>
     </tr>
   </table>
</div>



</body>
</html>


批改老师:韦小宝批改时间:2018-11-02 13:42:27
老师总结:案例是提交了,下次记得作业总还得有自己的总结!把作业当成笔记来完成哦!

发布手记

热门词条