如何在表单中制作 select 图片
How to make a select image in form
我需要一个带有图像的表格 selectables,我在 google 中搜索过,我尝试使用 select 选项,但这不起作用
你能给出解决这个问题的想法吗?
我正在使用纯波旁威士忌 (SASS)
我会把复选框做成图片,见fiddlehttps://jsfiddle.net/0c26tqd7/1/
编辑 我在 fiddle
中选中的复选框添加了红色边框
html
<input type="checkbox" name='thing1' id="thing1"/><label for="thing1"></label>
css
input[type=checkbox] {
display:none;
}
input#thing1[type=checkbox] + label
{
background-image: url("http://lorempixel.com/50/50/");
height: 50px;
width: 50px;
display:inline-block;
padding: 0 0 0 0px;
}
我需要一个带有图像的表格 selectables,我在 google 中搜索过,我尝试使用 select 选项,但这不起作用
你能给出解决这个问题的想法吗?
我正在使用纯波旁威士忌 (SASS)
我会把复选框做成图片,见fiddlehttps://jsfiddle.net/0c26tqd7/1/
编辑 我在 fiddle
中选中的复选框添加了红色边框html
<input type="checkbox" name='thing1' id="thing1"/><label for="thing1"></label>
css
input[type=checkbox] {
display:none;
}
input#thing1[type=checkbox] + label
{
background-image: url("http://lorempixel.com/50/50/");
height: 50px;
width: 50px;
display:inline-block;
padding: 0 0 0 0px;
}