开发者

HTML radiobutton color change

I think this is a pretty simple thing to do, but I don't know h开发者_开发问答ow.. thus I'm here. I have written a simple HTML form and need to change the color of the text on a Radio Button. Anyone have any ideas on how this is done?


<input type="radio" id="foo">
<label for="foo"> Blah Blah </label>

Now you select the LABEL via CSS and set it to have a color... You can use classes or relationship, for example:

.radioDiv label { color:blue; }


Assuming the following HTML:

<input type="radio" name="group1" value="Milk" /><span>Milk</span>

Just either add a class to the span, or wrap it in a div and style that using basic CSS:

#somediv span
{
   color: red;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜