{"id":14061,"date":"2023-11-20T21:37:37","date_gmt":"2023-11-20T18:37:37","guid":{"rendered":"https:\/\/elzero.org\/?p=14061"},"modified":"2023-11-22T23:56:18","modified_gmt":"2023-11-22T20:56:18","slug":"css-has-pseudo-class","status":"publish","type":"post","link":"https:\/\/elzero.org\/old\/css-has-pseudo-class\/","title":{"rendered":"CSS &#8211; Has() Pseudo Class"},"content":{"rendered":"<h3>\u0645\u062d\u062a\u0648\u0649 \u0627\u0644\u062f\u0631\u0633<\/h3>\r\n\r\n<script type=\"text\/plain\" class=\"language-html\">\r\n<!-- \r\n  Element:has(<Condition>)\r\n  Pseudo Class\r\n-->\r\n<div class=\"parent\">\r\n  <a href=\"#\">Link<\/a>\r\n<\/div>\r\n<div class=\"parent\">\r\n  <a href=\"#\">Link<\/a>\r\n  <span>Span<\/span>\r\n<\/div>\r\n<div class=\"parent\">Parent<\/div>\r\n<form action=\"\">\r\n  <div class=\"row\">\r\n    <div>\r\n      <input type=\"checkbox\" name=\"Os\" id=\"\" \/>\r\n    <\/div>\r\n  <\/div>\r\n<\/form>\r\n<\/script>\r\n\r\n<script type=\"text\/plain\" class=\"language-css\">\r\n\/* .parent:has(a, span) {\r\n  border: 2px solid red;\r\n} *\/\r\n.parent:has(a):has(span) {\r\n  border: 2px solid red;\r\n}\r\n.row:has(:checked) {\r\n  border: 2px solid green;\r\n}\r\n.parent:has(+ form) {\r\n  background-color: #ddd;\r\n}\r\n<\/script>","protected":false},"excerpt":{"rendered":"<p>\u0645\u062d\u062a\u0648\u0649 \u0627\u0644\u062f\u0631\u0633<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1423],"tags":[],"class_list":["post-14061","post","type-post","status-publish","format-standard","hentry","category-css-features"],"_links":{"self":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/14061","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/comments?post=14061"}],"version-history":[{"count":2,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/14061\/revisions"}],"predecessor-version":[{"id":14097,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/14061\/revisions\/14097"}],"wp:attachment":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/media?parent=14061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/categories?post=14061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/tags?post=14061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}