简体   繁体   中英

HTML checkbox 'checked' property affects style?

I have a small sliding options control I'm coding in plain HTML and JS. it looks like this in chrome:

在此处输入图片说明

When none of the checkboxes is checked, it works as expected but when I check a checkbox, the alignment of the right icons breaks:

在此处输入图片说明

This happens both in chrome and firefox.
The live example is here:

http://shooshx.github.io/happysolver/emscripten/index.html

What the difference in style between a checked and unchecked checkbox?
How can I fix the misalignement?

You have to remove float:right from .cube_count

结果

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM