且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

“+"是什么意思?(加号) CSS 选择器是什么意思?

更新时间:2023-01-24 14:33:00

参见W3.org 上的>相邻选择器.

在这种情况下,选择器意味着样式仅适用于紧跟另一个段落的段落.

In this case, the selector means that the style applies only to paragraphs directly following another paragraph.

一个普通的 p 选择器会将样式应用于页面中的每个段落.

A plain p selector would apply the style to every paragraph in the page.

这仅适用于 IE7 或更高版本.在 IE6 中,该样式不会应用于任何元素.顺便说一句,这也适用于 > 组合器.

This will only work on IE7 or above. In IE6, the style will not be applied to any elements. This also goes for the > combinator, by the way.

另请参阅 Microsoft 的 CSS 兼容性概述Internet Explorer.

See also Microsoft's overview for CSS compatibility in Internet Explorer.