summaryrefslogtreecommitdiff
path: root/content/digarden/pages/20220202144214-css.org
diff options
context:
space:
mode:
Diffstat (limited to 'content/digarden/pages/20220202144214-css.org')
-rw-r--r--content/digarden/pages/20220202144214-css.org33
1 files changed, 33 insertions, 0 deletions
diff --git a/content/digarden/pages/20220202144214-css.org b/content/digarden/pages/20220202144214-css.org
new file mode 100644
index 0000000..881afd0
--- /dev/null
+++ b/content/digarden/pages/20220202144214-css.org
@@ -0,0 +1,33 @@
+:PROPERTIES:
+:ID: 31e25f4a-008f-442d-9bb1-594d75303c84
+:END:
+#+title: CSS
+
+* Селектор html атрибута
+#+begin_src css
+ /* <a> elements with a title attribute */
+ a[title] {
+ color: purple;
+ }
+
+ /* <a> elements with an href matching "https://example.org" */
+ a[href="https://example.org"] {
+ color: green;
+ }
+
+ /* <a> elements with an href containing "example" */
+ a[href*="example"] {
+ font-size: 2em;
+ }
+
+ /* <a> elements with an href ending ".org" */
+ a[href$=".org"] {
+ font-style: italic;
+ }
+
+ /* <a> elements whose class attribute contains the word "logo" */
+ a[class~="logo"] {
+ padding: 2px;
+ }
+
+#+end_src