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/pseudo-elements/index.html | 97 +++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 files/fa/web/css/pseudo-elements/index.html (limited to 'files/fa/web/css/pseudo-elements') diff --git a/files/fa/web/css/pseudo-elements/index.html b/files/fa/web/css/pseudo-elements/index.html new file mode 100644 index 0000000000..ab3de8d597 --- /dev/null +++ b/files/fa/web/css/pseudo-elements/index.html @@ -0,0 +1,97 @@ +--- +title: Pseudo-elements +slug: Web/CSS/Pseudo-elements +translation_of: Web/CSS/Pseudo-elements +--- +
{{CSSRef}}
+ +

یک CSS pseudo-element کلمه کلیدی است که به انتخابگر اضافه می‌شود و اجازه می‌دهد قسمت خاصی از عنصر انتخاب شده را آرایش کنید. برای مثال، {{ Cssxref("first-line::") }} می‌تواند برای تغییر نوشتار و رنگ خط اول یک پاراگراف مورد استفاده قرار گیرد.

+ +
/* The first line of every <p> element. */
+p::first-line {
+  color: blue;
+  text-transform: uppercase;
+}
+ +
+

Note: In contrast to pseudo-elements, {{cssxref("pseudo-classes")}} can be used to style an element based on its state.

+
+ +

Syntax

+ +
selector::pseudo-element {
+  property: value;
+}
+ +

You can use only one pseudo-element in a selector. It must appear after the simple selectors in the statement.

+ +
+

Note: As a rule, double colons (::) should be used instead of a single colon (:). This distinguishes pseudo-classes from pseudo-elements. However, since this distinction was not present in older versions of the W3C spec, most browsers support both syntaxes for the original pseudo-elements.

+
+ +

Index of standard pseudo-elements

+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BrowserLowest VersionSupport of
Internet Explorer8.0:pseudo-element
9.0:pseudo-element ::pseudo-element
Firefox (Gecko)1.0 (1.0):pseudo-element
1.0 (1.5):pseudo-element ::pseudo-element
Opera4.0:pseudo-element
7.0:pseudo-element ::pseudo-element
Safari (WebKit)1.0 (85):pseudo-element ::pseudo-element
+ +

See also

+ + -- cgit v1.2.3-54-g00ecf