【发布时间】:2013-12-29 20:37:45
【问题描述】:
我有一个label,其中包含一个带有背景图像的Input Radio。
正如你在这里看到的
我需要将“Ja”和“Nej”设置为左侧 5-10pix,但我似乎无法找到解决方案。 有人可以帮我吗?
HTML:
<label id="labelradio1" for="Radio1">Ja
<input id="Radio1" type="radio" value="yes"></label>
<label id="labelradio2" for="Radio2">Nej
<input id="Radio2" type="radio" value="no"></label>
CSS:
#txtradiocall input[type='radio']{
position:absolute;
margin: -99999px;
}
#txtradiocall label{
display: inline-block;
cursor: pointer;
width: 15px;
height: 15px;
margin: 4px;
}
#txtradiocall #labelradio1 {
background: url('http://www.xxxx.com/images/images/thumb_up_green-v2.png');
background-repeat:no-repeat;
cursor: pointer;
width: 35px;
height: 22px;
}
#txtradiocall #labelradio2 {
background: url('http://www.xxxx.com/images/images/thumb_down-red-v2.png');
background-repeat:no-repeat;
cursor: pointer;
width: 35px;
height: 22px;
}
【问题讨论】:
标签: html css input radio-button label