伪类
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <style> div { width: 200px; height: 200px; background-color: red; } div:hover { width: 300px; height: 300px; background-color: black; } div:active { width: 100px; height: 100px; background-color: antiquewhite; } </style> </head> <body> <div></div> </body> </html>