CSS:调整checkbox大小 [英] CSS: adjusting checkbox size
问题描述
是否有方法调整< input type =checkbox/>
我已经尝试使用 style =width:30px; height:50px;
方法,但它没有工作。
任何想法?这是可能的吗?
I already tried it using style="width:30px; height:50px;"
approach, but it didn't work.
Any ideas? Is this even possible?
推荐答案
不,我不认为有一种方法只做使用html / css。
No, i don't think there's a way of doing it by only using html / css.
您可以制作一个叠加(div),它位于复选框的正上方,并使其可见。使用此叠加层,您可以添加自己的复选框图片,并在用户点击图片时更改其图片(= 可见值)。然后,您必须手动更新真实复选框的值,以确保表单可以包含复选框的表单值。
You could just make an overlay (div) which is positioned right over the checkbox and makes it visible. Using this overlay you could add an own checkbox graphic and change it's image (=it's visible value) whenever the user clicks on the image. Furhtermore you'll then have to update the real checkbox's value manually to assure that the form can be send containing the checkbox's form value.
技术通常由诸如QooxDoo,ExtJS等RIA框架使用。
This technique is often used by RIA frameworks like QooxDoo, ExtJS, etc.
here you'll find a really nice example of how to use the described technique.
这篇关于CSS:调整checkbox大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!