3月22日作业
实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>金庸小说排名</title> <style> /*第一步:给整个表格以及内部的所有单元格加上边框*/ table,th,td { border: 1px solid #333; } /*第二步:将整个表格以及内部单元格的边框全部折叠,就是线条二合一*/ table { /*折叠表格线*/ border-collapse: collapse; text-align: center; width: 80%; /*表格居中*/ margin: 50px auto; box-shadow: 3px 3px 3px #888; background-image: url(/images/bg.jpg); background-repeat: no-repeat; background-size: cover; } table caption { font-size: 1.6em; font-weight: bolder; margin-bottom: 30px; } th,td { padding: 10px; } td img { border-radius: 10%; box-shadow: 2px 2px 2px #888; } th { background-color: rgba(155,155,0,0.3); color: brown; } .green { color: darkgreen; font-weight: bolder; font-size: 1.2em; } </style> </head> <body> <table style="background-image : url(images/bg.jpg);background-repeat : no-repeat;"> <caption>§ 金庸小说排名 §</caption> <tr> <th>序号</th> <th>书名</th> <th>主角</th> <th>封面</th> <th>武功秘籍</th> <th>所属门派</th> <th>英雄事迹</th> </tr> <tr> <td>1</td> <td>《笑傲江湖》</td> <td>令狐冲</td> <td><img src="images/x.jpg" alt="" width="50"></td> <td>独孤九剑</td> <td>华山派</td> <td class="green">豪迈</td> </tr> <tr> <td>2</td> <td>《天龙八部》</td> <td>乔峰</td> <td><img src="images/t.jpg" alt="" width="50"></td> <td>降龙十八掌</td> <td>契丹</td> <td class="green">仗义豪情</td> </tr> <tr> <td>3</td> <td>《神雕侠侣》</td> <td>杨过&小龙女</td> <td><img src="images/s.jpg" alt="" width="50"></td> <td>古墓派</td> <td>神雕侠侣</td> <td class="green">和姑姑谈朋友</td> </tr> <tr> <td>4</td> <td>《射雕英雄传》</td> <td>郭靖</td> <td><img src="images/sd.jpg" alt="" width="50"></td> <td>全真教</td> <td>降龙十八掌</td> <td class="green">傻傻的</td> </tr> <tr> <td>4</td> <td>《鹿鼎记》</td> <td>韦小宝</td> <td><img src="images/l.jpg" alt="" width="50"></td> <td>天地会</td> <td>二十四史</td> <td class="green">好多老婆</td> </tr> <tr> <td>4</td> <td>《雪山飞狐》</td> <td>胡飞</td> <td><img src="images/xs.jpg" alt="" width="50"></td> <td>雪山派</td> <td>胡一刀</td> <td class="green">雪山飞狐</td> </tr> <tr> <td>4</td> <td>《倚天屠龙记》</td> <td>张无忌</td> <td><img src="images/y.jpg" alt="" width="50"></td> <td>明教</td> <td>乾坤大挪移</td> <td class="green">很帅</td> </tr> </table> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例
手抄图片