首页htmlaHTML Element Style - 如何用链接覆盖图像

HTML Element Style - 如何用链接覆盖图像

我们想知道如何用链接覆盖图像。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.mainLinks {
  padding-right: 30px;
  padding-bottom: 5px;
  background: #fff url(http://www.w3cschool.cn/style/download.png)
    no-repeat right top;
  text-decoration: none;
}
</style>
</head>
<body>
  <p>
    <a class="mainLinks" href="#">Test</a>
  </p>
</body>
</html>