Home >Web Front-end >HTML Tutorial >How to set different elements for links in different DIVs through CSS_html/css_WEB-ITnose
How to set different 3499910bf9dac5ae3c52d5ede7383485 elements for links in different DIVs through CSS, so that moving the mouse to different DIVs will make the 3499910bf9dac5ae3c52d5ede7383485 hyperlinks have different font sizes and colors? ? ?
<!DOCTYPE HTML><html> <head> <meta charset="gb2312" /> <title></title> <style> .a a:hover {color:red;} .b a:hover {color:blue;} .c a:hover {color:green;} </style> </head> <body> <div class="a"> <a href="#">12333333333</a> </div> <div class="b"> <a href="#">12333333333</a> </div> <div class="c"> <a href="#">12333333333</a> </div> </body></html>
When you create a div, get an ID, and then when you create a css style, there are several options you can choose from, one is class, one is ID, and one is composite (that is, you the label of the current cursor position). For example:
cc452beb6da0b7c4b5aba2129cbbffd3
ee7959cc8dd4be16ef633321c03dac321321235db79b134e9f6b82c0b36e0489ee08ed
16b28748ea4df4d9c2150843fecfba68
When you stop the cursor For the hyperlink tag, if you select "Composite" when creating a CSS style sheet, it will become #m a
This is to set the hyperlink with the ID "m" separately