3 ms·
Looks different between Firefox and Chrome. I'm guessing the way it displays for me is wrong since it looks off for some reason. Looking at the HTML I'm guessi
by talmand 15y ago
Looks different between Firefox and Chrome. I'm guessing the way it displays for me is wrong since it looks off for some reason.
Looking at the HTML I'm guessing you need javascript to detect it's current state to be able to act on it since it's just a bunch of divs?
I've played with similar ideas but going in a completely different direction. I use a checkbox for my toggle and just use CSS to alter the appearance based on that checkbox, no javascript.
http://jsfiddle.net/talmand/tb9NZ/ http://jsfiddle.net/talmand/tb9NZ/
Seems to work for me on Firefox and Chrome but not so much IE. It was an experiment so I didn't bother to work out that problem of fallback for IE.
- jacobolus 15y agoPretty sure CSS 3D transforms aren’t available yet in Firefox (at least in non-alpha versions).
- talmand 15y ago3D transforms? I'm curious, what are you referring to?
- mcpherrinm 15y agoThe latest release, Firefox 10, has 3D transforms. (I think -- I only have the nightly installed, which certainly does).
- jacobolus 15y agoExcuse me, you are right. In my defense, FF10 isn’t quite a week old.
- p0larboy 15y agoIt chanced upon me that i should have used input after I had completed the styling for the flip switch. Since I was already halfway there, I just went ahead with the javascript binding. If I'm not wrong, firefox support for css perspective is lacking hence the flip switch looks flatter in firefox. Saw your fiddle example. Awesome stuff~!
- talmand 15y agoOh believe me, I understand the need to get something to the done part once you've fiddled with it for a while. If anything, it's a good start on something that could be expanded into "useful" state. That is, once enough browsers catch up to the CSS3 requirement. Thanks for the compliment. I'm actually going to be giving a Meetup presentation later this month in the Dallas area on this topic, that's why I was quick on the reply. Here's more fiddle stuff if you're interested: http://jsfiddle.net/user/talmand/ http://jsfiddle.net/user/talmand/ I have several examples of using the checkbox in that manner.