首页htmlaHTML Element Style - 如何在所选区域上添加href可点击区域...

HTML Element Style - 如何在所选区域上添加href可点击区域...

我们想知道如何在所选区域上添加href可点击区域。...

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
td a {
  width: 100%;
  height: 100%;
  display: block;
  background: #cce;
}

td a:hover {
  background: #ecc;
}
</style>
</head>
<body>
  <table border="1">
    <tr>
      <td>row 1, cell 1</td>
      <td>row 1, cell 2</td>
    </tr>
    <tr>
      <td>row 2, cell 1</td>
      <td><a href="#">Link</a></td>
    </tr>
  </table>
</body>
</html>