diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:45 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:45 -0500 |
commit | 1109132f09d75da9a28b649c7677bb6ce07c40c0 (patch) | |
tree | 0dd8b084480983cf9f9680e8aedb92782a921b13 /files/fa/web/css/_colon_not | |
parent | 4b1a9203c547c019fc5398082ae19a3f3d4c3efe (diff) | |
download | translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.tar.gz translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.tar.bz2 translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.zip |
initial commit
Diffstat (limited to 'files/fa/web/css/_colon_not')
-rw-r--r-- | files/fa/web/css/_colon_not/index.html | 117 |
1 files changed, 117 insertions, 0 deletions
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' +--- +<div>{{CSSRef}}</div> + +<div dir="rtl"><strong><code>not()</code></strong> <a href="https://developer.mozilla.org/en-US/docs/Web/CSS">CSS</a> <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes">pseudo-class<strong><code>:</code></strong></a><a href="/en-US/docs/Web/CSS/Pseudo-classes"> </a> همه عناصر را انتخاب میکند بجز عناصری که به عنوان ورودی به این کلاس داده شود. <span id="result_box" lang="fa"><span>از آنجایی که این کلاس از انتخاب عناصر خاصی جلوگیری می کند، به عنوان </span></span> <em>negation pseudo-class</em><span lang="fa"><span> شناخته می شود.</span></span></div> + +<div dir="rtl"> </div> + +<pre class="brush: css no-line-numbers" dir="rtl">/* paragraph همه عناصر را انتخاب میکند بجز عنصر */ +:not(p) { + color: blue; +}</pre> + +<div class="note"> +<p><strong>Notes:</strong></p> + +<ul> + <li>Useless selectors can be written using this pseudo-class. For example, <code>:not(*)</code> matches any element which is not an element, so the rule will never be applied.</li> + <li>This pseudo-class can increase the <a href="/en-US/docs/Web/CSS/Specificity">specificity</a> of a rule. For example, <code>#foo:not(#bar)</code> will match the same element as the simpler <code>#foo</code>, but has a higher specificity.</li> + <li><code>:not(.foo)</code> will match anything that isn't <code>.foo</code>, <em>including {{HTMLElement("html")}} and {{HTMLElement("body")}}.</em></li> + <li>This selector only applies to one element; you cannot use it to exclude all ancestors. For instance, <code>body :not(table) a</code> will still apply to links inside of a table, since {{HTMLElement("tr")}} will match with the <code>:not()</code> part of the selector.</li> +</ul> +</div> + +<h2 id="Syntax">Syntax</h2> + +<p dir="rtl">ورودیهای شبهکلاس <code>()not:</code> با ویرگول از یکدیگر جدا میشود.</p> + +<p dir="rtl"> </p> + +<p> </p> + +<div class="warning"> +<p>The ability to list more than one selector is experimental and not yet widely supported.</p> +</div> + +<pre class="syntaxbox">{{csssyntax}}</pre> + +<h2 id="Example">Example</h2> + +<h3 id="HTML">HTML</h3> + +<pre class="brush: html"><p>این عنصر، عنصر پاراگراف است.</p> +<p class="fancy">من چقدر خوبم!</p> +<div>این عنصر، عنصر پاراگراف نیست.</div> +</pre> + +<h3 id="CSS">CSS</h3> + +<pre class="brush: 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; +}</pre> + +<h3 id="Result">Result</h3> + +<p>{{EmbedLiveSample('Example')}}</p> + +<h2 id="Specifications">Specifications</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('CSS4 Selectors', '#negation', ':not()')}}</td> + <td>{{Spec2('CSS4 Selectors')}}</td> + <td>Extends its argument to allow some non-simple selectors.</td> + </tr> + <tr> + <td>{{SpecName('CSS3 Selectors', '#negation', ':not()')}}</td> + <td>{{Spec2('CSS3 Selectors')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility">Browser compatibility</h2> + +<div> + + +<p>{{Compat("css.selectors.not")}}</p> +</div> |