如何改变单选按钮的大小使用CSS? [英] How to change the size of the radio button using CSS?
问题描述
有没有办法控制CSS中单选按钮的大小?
Is there a way to control the size of the radio button in CSS ?
推荐答案
设置它的高度和宽度与任何元素。但是,一些浏览器并不真正考虑这些属性。
Yes, you should be able to set it's height and width as with any element. However, some browsers do not really take these properties into account.
此演示概述了什么是可能的,以及它在各种浏览器中的显示方式。
http://www.456bereastreet.com/lab/styling-form -controls-revisited / radio-button /
This demo gives an overview of what is possible and how it is displayed in various browser. http://www.456bereastreet.com/lab/styling-form-controls-revisited/radio-button/
如您所见,样式单选按钮不容易:-D
As you'll see, styling radio button is not easy :-D
一种解决方法是使用javascript和css用自定义图像替换单选按钮和其他表单元素:
http://www.emblematiq.com/lab/niceforms/
http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/
...
A workaround is to use javascript and css to replace the radio buttons and other form elements with custom images :
http://www.emblematiq.com/lab/niceforms/
http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/
...
这篇关于如何改变单选按钮的大小使用CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!