单选按钮 - 选中时更改操作/符号

时间:2014-11-26 05:33:21

标签: css gravity-forms-plugin

我正在使用Gravity表单作为产品。我已经成功删除了单选按钮(因为我想将图像用作按钮)。

它指示某些内容的唯一方法是将文字设为粗体。

这不够明显。

以下是site

我可以添加绿色TICK或以某种方式为选定的图像添加边框吗?

这就是我的意思Screenshot

1 个答案:

答案 0 :(得分:1)

您的问题相当模糊,因为我们没有关于最终结果的大量信息。但是,我已多次这样做了,以及如何做到这一点:



label {
  cursor: pointer;
  } /* Change cursor when the label is hovered */

input[type=radio] {
  display: none;
  } /* Hide the ugly default radio styling */

label > span {
  display: none;
  } /* Hide the checkmark by default */

input[type=radio]:checked + span{
display: inline;
  color: green;
  } /* Show the checkmark when the radio is checked */

<label><input type="radio" name="obvious"><span>✓</span> I'm rather obvious.</label><br/>
<label><input type="radio" name="obvious"><span>✓</span> I'm rather obvious.</label><br/>
<label><input type="radio" name="obvious"><span>✓</span> I'm rather obvious.</label><br/>
<label><input type="radio" name="obvious"><span>✓</span> I'm rather obvious.</label>
&#13;
&#13;
&#13;

我希望这会有所帮助。如果您还需要其他任何内容,请在下方发表评论。