aboutsummaryrefslogtreecommitdiff
path: root/files/fa/web/css/adjacent_sibling_combinator/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:45 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:45 -0500
commit1109132f09d75da9a28b649c7677bb6ce07c40c0 (patch)
tree0dd8b084480983cf9f9680e8aedb92782a921b13 /files/fa/web/css/adjacent_sibling_combinator/index.html
parent4b1a9203c547c019fc5398082ae19a3f3d4c3efe (diff)
downloadtranslated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.tar.gz
translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.tar.bz2
translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.zip
initial commit
Diffstat (limited to 'files/fa/web/css/adjacent_sibling_combinator/index.html')
-rw-r--r--files/fa/web/css/adjacent_sibling_combinator/index.html80
1 files changed, 80 insertions, 0 deletions
diff --git a/files/fa/web/css/adjacent_sibling_combinator/index.html b/files/fa/web/css/adjacent_sibling_combinator/index.html
new file mode 100644
index 0000000000..c988c47aed
--- /dev/null
+++ b/files/fa/web/css/adjacent_sibling_combinator/index.html
@@ -0,0 +1,80 @@
+---
+title: Adjacent sibling combinator
+slug: Web/CSS/Adjacent_sibling_combinator
+translation_of: Web/CSS/Adjacent_sibling_combinator
+---
+<div>{{CSSRef("Selectors")}}</div>
+
+<p dir="rtl">ترکیب  (<code>+</code>) <strong>adjacent sibling combinator</strong> دو انتخابگر را از هم جدا می‌کند و زمانی تطابق انجام می‌شود که انتخابگر دوم بلافاصله بعد از انتخابگر اول آمده باشد و هر فرزند یک والد {{domxref("element")}} باشند.</p>
+
+<pre class="brush: css no-line-numbers">/* باشند img پارگراف‌هایی که بلافاصله بعد از */
+img + p {
+ font-style: bold;
+}</pre>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox">former_element + target_element { <em>style properties</em> }
+</pre>
+
+<h2 id="Example">Example</h2>
+
+<h3 id="CSS">CSS</h3>
+
+<pre class="brush: css">li:first-of-type + li {
+ color: red;
+}
+</pre>
+
+<h3 id="HTML">HTML</h3>
+
+<pre class="brush: html">&lt;ul&gt;
+ &lt;li&gt;One&lt;/li&gt;
+ &lt;li&gt;Two!&lt;/li&gt;
+ &lt;li&gt;Three&lt;/li&gt;
+&lt;/ul&gt;</pre>
+
+<h3 id="Result">Result</h3>
+
+<p>{{EmbedLiveSample('Example', 200, 100)}}</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', '#adjacent-sibling-combinators', 'next-sibling combinator')}}</td>
+ <td>{{Spec2('CSS4 Selectors')}}</td>
+ <td>Renames it the "next-sibling" combinator.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS3 Selectors', '#adjacent-sibling-combinators', 'Adjacent sibling combinator')}}</td>
+ <td>{{Spec2('CSS3 Selectors')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS2.1', 'selector.html#adjacent-selectors', 'Adjacent sibling selectors')}}</td>
+ <td>{{Spec2('CSS2.1')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<p>{{Compat("css.selectors.adjacent_sibling")}}</p>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/CSS/General_sibling_selectors">General sibling selectors</a></li>
+</ul>