Home > Web Front-end > CSS Tutorial > Why do css attributes need to be prefixed?

Why do css attributes need to be prefixed?

王林
Release: 2020-11-16 14:12:57
Original
2292 people have browsed it

The reason for prefixing css attributes: Although browser manufacturers have been implementing CSS3 before, it has not yet become a true standard. Therefore, when some CSS3 style syntax fluctuates, they need to provide browser-specific prefixes.

Why do css attributes need to be prefixed?

Cause analysis:

Although browser manufacturers have been implementing CSS3 before, it has not yet become a true standard. For this reason, some CSS3 style syntaxes need to provide browser-specific prefixes while they still exist.

(Learning video sharing: css video tutorial)

The main popular browser kernels are:

  • Trident Kernel: Mainly represented by IE browser

  • ##Gecko kernel: Mainly represented by Firefox

  • ##Presto kernel: Mainly represented by Opera
  • Webkit kernel: Product representatives are Chrome and Safari
  • And for browsers with different cores, CSS3 attributes (some attributes that need to be prefixed) correspond to the needs Adding different prefixes is also called the browser's private prefix. The CSS3 properties after adding the private prefix can be said to correspond to the browser's private properties:

    Trident kernel: The prefix is ​​-ms
  • Gecko kernel: The prefix is ​​-moz
  • Presto kernel: The prefix is ​​-o
  • Webkit kernel: The prefix is ​​-webkit
  • Related recommendations:
CSS tutorial

The above is the detailed content of Why do css attributes need to be prefixed?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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