Home>Article>Web Front-end> Detailed introduction to css selectors
What is a selector?
The function of the selector is to find the element through it and pass the css style to the element! CSS selectors are mainly divided into four categories: basic selectors, attribute selectors, combination selectors and pseudo-class selectors!
css basic selector
Basic selector is divided into: * wildcard, label selector, class selector, id selector, you need to pay attention to the programming here The idea is that elements in css cascading style sheets have one and only one id. Pay attention to the following points: 1. ID uniqueness 2. Element IDs are not the same, just like each person has only one ID card, ID represents the ID card 3. The class selector is not unique, it can be reused! In addition, this * wildcard represents the whole world.
css基本选择器 大灰牛博客专注web前端技术学习
(Recommended tutorial:CSS introductory tutorial)
css combination selector
Put the basic selector through special symbols There are opinions that stringing them together is called css combination selectors. Common css combination selectors include: group selectors, nested selectors, sub-selectors, adjacent same-level selectors
css组合选择器 成功的花,人们只惊羡她现时的明艳!然而当初她的芽儿,浸透了奋斗的泪泉,洒遍了牺牲的血雨自以为懂得很多了经历很多了最后才知道都是那么的可笑
我们不要只看成功者荣誉的瞬间,更要看到成功者为之努力、为之奋斗的过程,从而激励自己也不断付出,奔着那个成功的目标前进.
成功的花,人们只惊羡她现时的明艳!然而当初她的芽儿,浸透了奋斗的泪泉,洒遍了牺牲的血雨我们不要只看成功者荣誉的瞬间,更要看到成功者为之努力、为之奋斗的过程,从而激励自己也不断付出,奔着那个成功的目标前进.
css attribute selector
Basic selector [attribute], basic selector [attribute=value], basic selector [attribute~=value] separated by multiple spaces, basic selector [attribute] What does ^=value] start with and what does the basic selector [attribute $=value] end with?
css属性选择器 If you can NOT explain it simply, you do NOT understand it well enough你们没发现嘛?2013爱你一生,2014爱你一世,2015爱你一屋,2016爱你一路,2017爱你一切。Recommended related video tutorials:css video tutorial
The above is the detailed content of Detailed introduction to css selectors. For more information, please follow other related articles on the PHP Chinese website!
Statement:This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete