【发布时间】:2013-06-19 22:43:50
【问题描述】:
我有一个表格,人们可以选择他们喜欢的电影,我使用收音机进行估算。我已经用一张图片替换了它,当它被选中时,它会变成另一张图片。它在 Chrome 和 IE 中可以正常工作,但在 Firefox 中却不行。代码在这里..
CSS
#votetable input[type=radio] {
float: bottom;
-webkit-appearance: none;
border: none;
height: 402px;
width: 275px;
background: url("hobbit.jpg") left center no-repeat;
background-size: 402px;
}
#votetable input[type="radio"]:checked {
background: url("select.jpg") left center no-repeat;
}
html 仅供参考
HTML
<table id="votetable">
<tr> <td>
<label for="movie1"></label>
<input type="radio" id="movie1" name="movie" value="batman"/>
</td>
</tr>
</table>
这在 Chrome 和 IE 中效果很好,但在 Firefox 中却不行。有什么我可以添加到我的代码中以使其在 Firefox 中工作的东西吗?我想只使用 CSS 和 HTML。任何帮助,将不胜感激。
【问题讨论】:
-
也许你可以试试:-moz-appearance:none,但是,我没有测试过......
标签: css image input radio checked