时间: 2021-07-31 作者:daque
在咱们创造网页的进程中,用到表格的场合特殊多,精巧应用表格本领不妨为咱们的网页出色不少,这边我就精细引见几中殊效表格的创造本领。
一、彩色虚线表格
<style type="text/css"><!--.tab1 {border-top-width: thin;border-right-width: thin;border-bottom-width: thin;border-left-width: thin;border-top-style: dotted;border-right-style: dotted;border-bottom-style: dotted;border-left-style: dotted;border-top-color: #00cc66;border-right-color: #0099cc;border-bottom-color: #ff0000;border-left-color: #6699ff;}--></style><table width="200" border="0" cellpadding="2" cellspacing="2" class="tab1"><tr> <td><div align="center">虚</div></td><td><div align="center">线</div></td></tr><tr> <td><div align="center">表</div></td><td><div align="center">格</div></td></tr></table>
二、鼠标指向单位格变色 onmouseout="this.style.backgroundcolor=''" 鼠标摆脱功效onmouseover="this.style.backgroundcolor='#ffcccc'"鼠标放上去的功效,不妨窜改#ffcccc的值来变换脸色<table width="200" border="1" cellspacing="0" cellpadding="0"><tr> <td onmouseout="this.style.backgroundcolor=''" onmouseover="this.style.backgroundcolor='#ffcccc'"> </td></tr><tr> <td onmouseout="this.style.backgroundcolor=''" onmouseover="this.style.backgroundcolor='#ffccaa'"> </td></tr></table>