App下載
首頁htmlaHTML Element Style - 如何在所選區(qū)域上添加href可點(diǎn)擊區(qū)域...

HTML Element Style - 如何在所選區(qū)域上添加href可點(diǎn)擊區(qū)域...

我們想知道如何在所選區(qū)域上添加href可點(diǎn)擊區(qū)域。...

<!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>