Click to fire CSS handgun on Codepen!
# October 24, 2013 at 8:22 pm
This reply has been reported for inappropriate content.
To my knowledge that wouldn’t work. You can only cause a transition on another element if that element is a child of the parent that is clicked.
I’m sure you could do whatever you want with jQuery but it was important for me the keep it CSS only.
Also, I thought about a sound effect but I have a weird philosophical objection to sound on websites. At least forced sound. Not like a video. Tends to take the user by surprise which makes for bad UX.# October 25, 2013 at 6:56 pm
It doesn’t work in IE because the child elements are getting in the way of making the parent active. To fix this add
to the #gun div and change the z-index of all of the children to a negative number appropriate to where they need to be. This will place the parent div on top (the transparent background color makes it clickable and the height and width gives it the area to click). When you do this it will work in IE.
You must be logged in to reply to this topic.