Introduction to the implementation method of CSS-making stereoscopic navigation bar

Source: Internet
Author: User
This article mainly introduces the use of CSS to make three-dimensional navigation bar related data, the need for friends can refer to the following

CSS production of three-dimensional navigation bar, the implementation code is as follows:


<!doctype html>

Summarize:

1. Body part with unordered list

2, (1) hover

The effect when the mouse moves over.

(2) Questions:: Before and: the difference between before

In simple terms, a single colon (:) used for CSS3 pseudo-classes, double colons (::) for CSS3 pseudo-elements.

Specifications for CSS Selectors:

A Pseudo-element is made of both colons (::) followed by the name of the pseudo-element.
This:: Notation are introduced by the current document in order to establish a discrimination between pseudo-classes and P Seudo-elements. For compatibility with existing style sheets, user agents must also accept the previous One-colon notation for Pseudo-elem Ents introduced in CSS levels 1 and 2 (namely,: First-line,: First-letter,: Before And:after). This compatibility isn't allowed for the new pseudo-elements introduced in CSS level 3.

Simple translation: Pseudo-elements consist of double colons and pseudo-element names. Double colons are introduced in the current specification to differentiate between pseudo-classes and pseudo-elements. However, the browser needs to support the old existing pseudo-elements, such as: First-line,: First-letter,: Before, after, and the new pseudo-element introduced in CSS3 does not allow the old single colon to be supported.

Now you can answer the questions in the title completely, for the pseudo-elements that existed before CSS2, such as: before, single colon and double colon: the Before function is the same.

Therefore, if your site only need to be compatible with WebKit, Firefox, Opera and other browsers, it is recommended that the pseudo-elements of the use of double colons, if you have to be compatible with IE browser, or with CSS2 single colon is more secure.

Summarize

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.