More fun with :target
Some of you have probably seen my CSS3: fun with target demo. I’ve added 58 lines of Javascript that allows the windows to be:
- Clicked: When you click on a window, it should receive focus and be brought to the top of the stack. Just by setting the
location.hashproperty. CSS does the rest. - Dragged: Grab the titlebar of any of the three “windows” and drag them around. Please note that dragging semi-transparent images around provides a rather jerky and unpleasant experience on older computers.
You might also want to read the original announcement.
Comments
Comment from Asbjørn Ulsberg on 2003-08-04 16:48
Great work! And all with standard-compliant code. Doesn’t work at all in IE, but that’s Microsoft’s fault, not yours. Neat. #:-)
Comment from Michael on 2006-01-10 17:49
It works in Safari 1.3; however, if you click on a window that is already selected (to drag it around, for example) the browser reloads the page for some reason. I have no idea why.
Comment from Arve on 2006-01-10 18:02
Michael: That is indeed a bug in Safari.
This discussion has been closed. No further comments may be added.