更改单选按钮和组合框的样式 [英] Change style of radio button and combo box
本文介绍了更改单选按钮和组合框的样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想给我的单选按钮和组合框一些样式.
所以,我该怎么做才能使它们看起来有吸引力..............:confused :: confused :: confused :: confused:
I want to give some style to my radio button and combo box.
So what should I do to make them look attractive ..............:confused::confused::confused::confused:
推荐答案
这些样式的问题是什么...
您可以使用适当的CSS轻松地做到这一点.
检查一下:
http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/ [^ ]
希望您会喜欢. :cool:
What is the problem with styling with these...
You can do that easily using proper CSS to them.
Check this out :
http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/[^]
I hope you will like this. :cool:
您可以为控件创建css类,然后将该类分配给控件.
您可以设置backgroudn-color,color,font-family,font-size等属性,以根据您的布局提供更好的外观.
例如.
选择
{
背景颜色:#000000;
颜色:#ffffff;
font-family:ariel;
font-size:10;
}
希望这能解决您的问题.也可以在控件中设置背景图片.
Hi,
You can create css class for your control and assign that class to your control.
you can set backgroudn-color, color, font-family, font-size, etc properties to give better look according to your layout.
eg.
select
{
background-color:#000000;
color:#ffffff;
font-family:ariel;
font-size:10;
}
hope this will solve your problem. also you can set background image in your control.
试试这个
try this one
body {
font: 0.8em/21px arial,sans-serif;
}
.checkbox, .radio {
width: 19px;
height: 25px;
padding: 0 5px 0 0;
background: url(checkbox.gif) no-repeat;
display: block;
clear: left;
float: left;
}
.radio {
background: url(radio.gif) no-repeat;
}
.select {
position: absolute;
width: 158px; /* With the padding included, the width is 190 pixels: the actual width of the image. */
height: 21px;
padding: 0 24px 0 8px;
color: #fff;
font: 12px/21px arial,sans-serif;
background: url(select.gif) no-repeat;
overflow: hidden;
}
这篇关于更改单选按钮和组合框的样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文