Jump to content

Function of hover


satimis
 Share

Recommended Posts

The :hover psuedo class applies to elements that have the mouse over them. The particular selector you posted refers to an anchor element (<a>) that is a descendant of an element with the id 'menu'. The selector uses the :hover psuedo class on the a, so those styles will only apply when you hover the mouse over one of those anchors.

Link to comment
Share on other sites

The :hover psuedo class applies to elements that have the mouse over them. The particular selector you posted refers to an anchor element (<a>) that is a descendant of an element with the id 'menu'. The selector uses the :hover psuedo class on the a, so those styles will only apply when you hover the mouse over one of those anchors.
If I understand your advice correctly.
#menu a:hover {color: #a00;background: #fff;}

1)

		<ul>		  <li><a href="../css-dropdown-menus.html" title="tanfa Introduction">Intro for CSS Enthusiasts</a></li>		  <li><a href="index.html" title="Plain HTML Code">Demonstration HTML</a></li>		  <li><a href="http://www.xs4all.nl/~peterned/csshover.html" title="whatever:hover file">csshover.htc file</a></li>		</ul>

When placing the mouse point on "Intro for CSS Enthusiasts" it popup a short note "tanfa Introduction"(title)etc.2)

[<a href="hs3.html" title="Horizontal Example 3">3</a>] [<a href="hs4.html" title="Horizontal Example 4">4</a>] [<a href="hs5.html" title="Horizontal Example 5">5</a>] [<a href="hs6.html" title="Horizontal Example 6">6</a>] [<a href="hs7.html" title="Horizontal Example 7">7</a>]

When placing the pointer on "3" it popup "Horizontal Example 3" etc.The bracket [ ] on both ends of the line encloses "3" displaying it [3]Thankssatimis

Link to comment
Share on other sites

Well, yes, that's how the title attribute works. But that has nothing to do with :hover. A classic example of hover, is links. By default a link is styled in blue text with an underline. When you hover the mouse over it, the link changes to red text. This is the default :hover style for links. If you have the following CSS:a:hover {color: green;}The links would turn green when you hover over them with the mouse.

The bracket [ ] on both ends of the line encloses "3" displaying it [3]
The brackets would make the link display with brackets on either side, something like:[3]It would not affect the actual link or title in any way.
Link to comment
Share on other sites

Well, yes, that's how the title attribute works. But that has nothing to do with :hover. A classic example of hover, is links. By default a link is styled in blue text with an underline. When you hover the mouse over it, the link changes to red text. This is the default :hover style for links. If you have the following CSS:a:hover {color: green;}The links would turn green when you hover over them with the mouse.The brackets would make the link display with brackets on either side, something like:[3]It would not affect the actual link or title in any way.
Your advice noted. ThanksB.R.satimis
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...