How to set different elements for links in different DIVs through CSS_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 12:10:59
Original
1605 people have browsed it

How to set different elements for links in different DIVs through CSS, so that moving the mouse to different DIVs will make the hyperlinks have different font sizes and colors? ? ?


Reply to discussion (solution)

<!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>
Copy after login



What does this mean?

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:


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

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template