Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> div { padding: 30px; background-color: #8ebf42; color: #eee; } div:active { background-color: #666; color: #fff; } </style> </head> <body> <h2>:active selector example</h2> <div> Lorem ipsum is simply dummy text... </div> </body> </html>