Web Front End Interview Guide (12)::: Before and: What is the difference between before?

Source: Internet
Author: User

Topic Reviews

This problem seems very simple, but if not before pondering this problem, give a person feel is also the head of the door, hear this topic is crazy, because the original never notice this problem, even if there is attention to this problem can not be very good answer clear. The technique of answering is to answer from the same points and different points, their roles, and cautions. 650) this.width=650; "alt=" Struggle "src=" http://static.blog.csdn.net/xheditor/xheditor_emot/default/struggle.gif "style = "Border:none;"/>

Answer points

    • Same point

    1. Can be used to represent pseudo-class objects, which are used to set the content before the object

    2. : befor and:: Before notation is equivalent

    • Different points

    1. : Befor is the CSS2,:: Before is the Css3 of the wording

    2. : Before compatibility is better than:: Before good, but recommended in H5 development:: Before better

Add sub-item

  1. Pseudo-class objects are used in conjunction with the Content property

  2. Pseudo-class objects do not appear in the DOM, so they cannot be manipulated by JS, simply by adding the CSS render layer

  3. The effects of pseudo-class objects are typically used: hover pseudo-class styles to activate

    [CSS] view plain copy 650) this.width=650; "Src=" https://code.csdn.net/assets/CODE_ Ico.png "width=" "height=" "alt=" on code to view the chip "style=" Border:none; "/>650" this.width=650; "src=" https ://code.csdn.net/assets/ico_fork.svg "width=" "height=" "alt=" derived from My Code slice "style=" border:none; "/>

      1. . test:hover::before { /* At this time animation and transition only take effect */ }

--------------------------------------------------------------------------------------------------------------- -----



This article from "Wisdom 1" blog, reproduced please contact the author!

Web Front End Interview Guide (12)::: Before and: What is the difference between before?

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.