{"id":1821,"date":"2010-04-26T15:19:00","date_gmt":"2010-04-26T13:19:00","guid":{"rendered":""},"modified":"2020-05-01T18:34:59","modified_gmt":"2020-05-01T16:34:59","slug":"icone-generate-automaticamente","status":"publish","type":"post","link":"https:\/\/digitalia.culturanuova.net\/blog\/?p=1821","title":{"rendered":"icone generate automaticamente"},"content":{"rendered":"<p>Segnalo un interessante tip (da Opera-dev):<\/p>\n<p>You can use attribute selectors with the content property to render icons after a link based on what file format it is or if it is an external one.<\/p>\n<p>a[href $=&#8217;.pdf&#8217;]:after {&nbsp;&nbsp; content:url(icon-pdf.png);}&nbsp;&nbsp; <\/p>\n<p>a[rel=&#8221;external&#8221;]:after {&nbsp; \/* You can also use a[href ^=&#8221;http&#8221;]:after *\/<br \/>\n&nbsp;&nbsp; content:url(icon-external.png);}<\/p>\n<p>the first rule uses a CSS3 selector with substring matching \u2014 href $=&#8217;.pdf&#8217; means &#8220;href attributes with .pdf at the end of the value.&#8221;<\/p>\n<p>As with regular expressions, ^ and $ refer to the start and end of a string, respectively. With CSS 3 substring matching attribute selectors, [attribute^=value] and [attribute$=value] allow you to match elements whose attribute content starts or ends with the specified value, while [attribute*=value] selects elements where the value is found anywhere in the attribute.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Segnalo un interessante tip (da Opera-dev): You can use attribute selectors with the content property to render icons after a link based on what file format it is or if it is an external one. a[href $=&#8217;.pdf&#8217;]:after {&nbsp;&nbsp; content:url(icon-pdf.png);}&nbsp;&nbsp; a[rel=&#8221;external&#8221;]:after {&nbsp; \/* You can also use a[href ^=&#8221;http&#8221;]:after *\/ &nbsp;&nbsp; content:url(icon-external.png);} the first rule uses &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/digitalia.culturanuova.net\/blog\/?p=1821\" class=\"more-link\">Leggi tutto<span class=\"screen-reader-text\"> &#8220;icone generate automaticamente&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5,537],"class_list":["post-1821","post","type-post","status-publish","format-standard","hentry","category-senza-categoria","tag-css","tag-generated-content"],"_links":{"self":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1821"}],"version-history":[{"count":1,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1821\/revisions"}],"predecessor-version":[{"id":1822,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1821\/revisions\/1822"}],"wp:attachment":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}