javascript - Changing style of input without display:none -
javascript - Changing style of input without display:none -
a mutual way replace standard input display:none
input, , add together background-image
label.
css:
class="lang-css prettyprint-override">input[type="checkbox"] { display: none; } input[type="checkbox"]+label { background: url('../images/checkbox_unchecked.png') left center no-repeat; background-size: 25px; } input[type="checkbox"]:checked+label { background: url('../images/checkbox_checked.png') left center no-repeat; background-size: 25px; }
the problem: html broken afterwards. when want alter direction of elements, have alter within css (background: right
).
how can alter image/style of input field without create display:none
first, , alter background image? has work in android 2.3.
edit: jsfiddle.
the simple prepare rtl
issue (assuming main problem here, based on jsfiddle demo), style on dir
attribute when set "rtl":
.styles[dir="rtl"] input[type="radio"]+label { background-position: right; /* set background position right. */ padding-left: 0; /* reset left padding on label. */ padding-right: 35px; /* give label right padding. */ }
jsfiddle demo.
everything i've used above should work on android 2.3 according can use....
javascript html css
Comments
Post a Comment