From 1109132f09d75da9a28b649c7677bb6ce07c40c0 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:45 -0500 Subject: initial commit --- files/fa/web/css/_colon_not/index.html | 117 +++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 files/fa/web/css/_colon_not/index.html (limited to 'files/fa/web/css/_colon_not') diff --git a/files/fa/web/css/_colon_not/index.html b/files/fa/web/css/_colon_not/index.html new file mode 100644 index 0000000000..7f7c5cbec3 --- /dev/null +++ b/files/fa/web/css/_colon_not/index.html @@ -0,0 +1,117 @@ +--- +title: ':not()' +slug: 'Web/CSS/:not' +tags: + - سی اس اس + - شبه کلاس + - لایه + - مرجع + - وب +translation_of: 'Web/CSS/:not' +--- +
{{CSSRef}}
+ +
not() CSS pseudo-class:  همه عناصر را انتخاب می‌کند بجز عناصری که به عنوان ورودی به این کلاس داده شود. از آنجایی که این کلاس از انتخاب عناصر خاصی جلوگیری می کند، به عنوان negation pseudo-class شناخته می شود.
+ +
 
+ +
/* paragraph همه عناصر را انتخاب می‌کند بجز عنصر */
+:not(p) {
+  color: blue;
+}
+ +
+

Notes:

+ + +
+ +

Syntax

+ +

ورودی‌های شبه‌کلاس ()not: با ویرگول از یکدیگر جدا می‌شود.

+ +

 

+ +

 

+ +
+

The ability to list more than one selector is experimental and not yet widely supported.

+
+ +
{{csssyntax}}
+ +

Example

+ +

HTML

+ +
<p>این عنصر، عنصر پاراگراف است.</p>
+<p class="fancy">من چقدر خوبم!</p>
+<div>این عنصر، عنصر پاراگراف نیست.</div>
+
+ +

CSS

+ +
.fancy {
+  text-shadow: 2px 2px 3px gold;
+}
+
+/* نیستند `fancy` که دارای کلاس <p> ِتمام عنصار */
+p:not(.fancy) {
+  color: green;
+}
+
+/* <p> همه عناصر بجز عنصر */
+body :not(p) {
+  text-decoration: underline;
+}
+
+/* <span> یا <div> همه عناصر بجز عناصر */
+body :not(div):not(span) {
+  font-weight: bold;
+}
+/* را دارا هستند `fancy` یا `crazy` همه عناصر بجز عناصری که کلاس‌های */
+/* توجه داشته باشید که این نوع نوشتار هنوز پشتیبانی نمی‌شود. */
+body :not(.crazy, .fancy) {
+  font-family: sans-serif;
+}
+ +

Result

+ +

{{EmbedLiveSample('Example')}}

+ +

Specifications

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('CSS4 Selectors', '#negation', ':not()')}}{{Spec2('CSS4 Selectors')}}Extends its argument to allow some non-simple selectors.
{{SpecName('CSS3 Selectors', '#negation', ':not()')}}{{Spec2('CSS3 Selectors')}}Initial definition.
+ +

Browser compatibility

+ +
+ + +

{{Compat("css.selectors.not")}}

+
-- cgit v1.2.3-54-g00ecf