What are the css selectors? Which properties can be inherited?

王林
Release: 2020-06-19 17:47:28
forward
3004 people have browsed it

What are the css selectors? Which properties can be inherited?

CSS selector:

id selector (#myid), class selector (.myclassname), label selector (div, h1, p), relative Neighbor selector (h1 p), child selector (ul > li), descendant selector (li a), wildcard selector (*), attribute selector (a[rel=”external”]), pseudo-class selection Device (a:hover, li:nth-child)

(Recommended tutorial: css quick start)

Inheritable attributes:

font -size, font-family, color

Non-inheritable styles:

border, padding, margin, width, height

Priority (proximity principle):

!important > [ id > class > tag ]!important has higher priority than inline

The above is the detailed content of What are the css selectors? Which properties can be inherited?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:juejin.im
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!