fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote2012-04-16 12:28 am

Interesting CSS effect

What's the Deal with :target in CSS?

Here's a neat effect to mark out the currently linked-to comment item. Put this in your journal's CSS:

Then switch which comment is currently active by editing the #cmt... at the end of the URL.

I have custom comments turned off in my journal, so here's a demo of :target in action on a separate page.

Note: not currently useful for anything because we don't link to our comments this way -- but still kinda neat!

Post a comment in response:

Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
Account name:
If you don't have an account you can create one now.
HTML doesn't work in the subject.


Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.