CSS - 样式图标

时间:2014-04-13 16:52:04

标签: html css

嘿伙计们我需要制作我的图标<a href="">,但我不知道如何

      <tr>
          <td rowspan="2" class="imgbg"><a href="#"><img src="images/nonsteam.jpg"></a></td>
          <td class="icon"></td>
          <td class="download-name"><a href="#">Counter Strike 1.6 Nonsteam</a></td>
          <td class="download-category">Counter-Strike / Jebat / Mrdat / Nonsteam / Hra </td>
          <td class="imgbg"><div class="download-icon"></div></td>
          <a href="#"><td class="comment-icon"></td></a>
      </tr>

CSS:

#downloads .download-icon{
    background-image: url("images/dark_download.png");
    background-repeat: no-repeat;
    width: 34px;
    height: 28px;
    display: inline-block;
    margin: 13px 0px 0px 10px;
}

#downloads .comment-icon{
    background-image: url("images/dark_buble.png");
    background-repeat: no-repeat;
    width: 33px;
    height: 34px;
    display: inline-block;
    margin: 24px 0px 0px 20px;
}

有人可以帮我吗?

1 个答案:

答案 0 :(得分:0)

如果您想要td可点击,那么您可以

<td class="comment-icon" onclick="window.location='http://www.google.co.in'"></td>

<td class="icon"></td>
JAVASCRIPT:        
$('.icon').click(function () {
   alert('blue-theme');
});

但是您无法更改<table><tr><td></td></tr></table>的格式,因此您无法在a标记之前添加td标记。

DEMO