CSS3 learning-use CSS to create a three-dimensional navigation bar and css3css navigation bar

Source: Internet
Author: User

CSS3 learning-use CSS to create a three-dimensional navigation bar and css3css navigation bar

<! Doctype html> 

:

1

2

 

Summary:

1. unordered list is used for the body part.

2. (1) hover

The effect of moving the mouse over.

(2) Questions: Before AND: before

In short, a single colon (:) is used for the CSS3 pseudo class, and a double colon (: :) is used for the CSS3 pseudo element.

W3c standards for css selectors:

A pseudo-element is made of two colons (::) Followed by the name of the pseudo-element.

This::Notation is introduced by the current document in order to establish a discrimination between pseudo-classes and pseudo-elements. for compatibility with existing style sheets, user agents must also accept the previous one-colon notation for pseudo-elements introduced in CSS levels 1 and 2 (namely,:first-line,:first-letter,:beforeAnd:after). This compatibility is not allowed for the new pseudo-elements introduced in CSS level 3.

Pseudo elements consist of double colons and pseudo element names. Double colons are introduced in the current specification to distinguish between pseudo classes and pseudo elements. However, the browser also needs to support the old pseudo-element writing method, such as first-line, first-letter, before, and after, the new pseudo elements introduced in CSS3Not AllowedThe old single colon statement is supported.

    

Now we can answer all the questions in the title. For the existing pseudo elements in CSS2, such as before, single colon and double colon, the statement is: before.The role is the same.

 

So, if your websiteOnlyCompatible with browsers such as webkit, firefox, and opera. We recommend that you use double colons for pseudo elements. If you have to be compatible with IE browsers, it is safer to use a single colon in CSS2.

    

 

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.