How to exclude selection in css

WBOY
Release: 2022-04-20 15:06:57
Original
3485 people have browsed it

In CSS, you can use the ":not" selector to exclude selection. This selector will match every element that is not a specified element, that is, to exclude the specified element. The syntax is "Element: not (specify elements to be excluded){css style code}".

How to exclude selection in css

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

How to perform exclusive selection in css

:not(selector) The selector matches each element of the non-specified element/selector.

":not" is a type of selector. If you want a certain style not to apply to the selector, you can use :not (selector)

The syntax is:

:not(selector)
Copy after login

Examples are as follows:

   

这是标题

这是一个段落。

这是另一个段落。

这是 div 元素中的文本。

这是一个a标签
Copy after login

Output results:

How to exclude selection in css

(Learning video sharing:css video tutorial)

The above is the detailed content of How to exclude selection in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
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
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!