css3新增加的选择器
一、属性选择器:
E[attr] 只要有属性名
E[attr=value] 属性名=属性值
E[attr~=blue] 包含这个blue整个单词就可以
E[attr^=c] 以这个字母c开头的
E[attr$=b] 以这个字母b结尾的
E[attr*=a] 只要包含a这个字母就行
E[attr|=z] 只要以字母z-开头的或者就是字母z的
二、结构性伪类选择器:
E:nth-child(n) 第n个子节点
div:nth-child(odd) 奇数行
div:nth-child(even) 偶数行
div:nth-child(2n) 2的倍数
E:nth-last-child(n) 倒数第n个
三、其他:
E:empty 空元素
E:first-child 第一个子节点、和 E:nth-child(1)等价
E:last-child 倒数第一个、和 E:nth-last-child(1)等价
* 注意不能有其他兄弟节点
E:target 锚点元素的样式
div:target{width:100px;}
只要锚点有#div1那上面的target样式就会生效
E:disabled 表单元素设置disabled
E:enabled 可点击的表单元素
E:checked 表示已经选中的checkbox或者radio
文本新增伪类:
E:first-line 第一行
E:first-letter 第一个字
E::selection 选中文本的时候
E::before E标签前面添加东西,需要配合content来用
E::after E标签后面添加东西
E:before E:after单引号也能用
E:not(s) 不包括s
h1:not(.red) 排除有class为red的h1元素
E~F E后面的F兄弟节点

The official account web page update cache, this thing is simple and simple, and it is complicated enough to drink a pot of it. You worked hard to update the official account article, but the user still opened the old version. Who can bear the taste? In this article, let’s take a look at the twists and turns behind this and how to solve this problem gracefully. After reading it, you can easily deal with various caching problems, allowing your users to always experience the freshest content. Let’s talk about the basics first. To put it bluntly, in order to improve access speed, the browser or server stores some static resources (such as pictures, CSS, JS) or page content. Next time you access it, you can directly retrieve it from the cache without having to download it again, and it is naturally fast. But this thing is also a double-edged sword. The new version is online,

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

This article demonstrates efficient PNG border addition to webpages using CSS. It argues that CSS offers superior performance compared to JavaScript or libraries, detailing how to adjust border width, style, and color for subtle or prominent effect

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Chinese version
Chinese version, very easy to use

Notepad++7.3.1
Easy-to-use and free code editor

Dreamweaver Mac version
Visual web development tools
