如何在以下方式设置文本样式:选中单选按钮?
-
03-07-2019 - |
题
我尝试了以下内容:
:checked + *
{
font-weight: bold;
}
使用以下html:
<p><input type = "radio" name = "blah" />some text</p>
我如何设计这样的文字?
<强>解决方案:强>
在文本周围投掷标签标签,然后选择
:选择+ *
它适用于opera和ff3,所以我很好。
解决方案
您可以使用label元素将文本和其他内联内容与表单输入相关联:
<input id="foo" ...> <label for="foo" ...>foo text</label>
然后选择[for =&quot; foo&quot;]或#foo + label或其他。
不隶属于 StackOverflow