{"id":2306,"date":"2021-01-06T09:41:57","date_gmt":"2021-01-06T08:41:57","guid":{"rendered":"https:\/\/digitalia.culturanuova.net\/blog\/?p=2306"},"modified":"2021-01-06T10:01:24","modified_gmt":"2021-01-06T09:01:24","slug":"svg-rounded-corner-and-shadow","status":"publish","type":"post","link":"https:\/\/digitalia.culturanuova.net\/blog\/?p=2306","title":{"rendered":"svg rounded corner and shadow"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">shadow (like css shadow-box)<\/h4>\n\n\n\n<p>At least with Firefox you can use a filter, like the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.shadow{filter: drop-shadow(8px 6px 6px gray);}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">rounded corner<\/h4>\n\n\n\n<p>The simplest way to round the corners of a box is to <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>use <code>rect<\/code> element with rx and ry attributes (such as <code>rx=\"20\" ry=\"20\"<\/code>)<\/li><li>and define the style of rect with <code>stroke-linejoin:round;<\/code> and something like stroke:[your color]; stroke-width:[the width you like];<\/li><\/ul>\n\n\n\n<p>You can see the following example<\/p>\n\n\n\n<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n <rect x=\"2\" y=\"5\" rx=\"20\" width=\"220px\" height=\"100px\" ry=\"20\" stroke=\"gray\" stroke-linejoin=\"round\" stroke-width=\"10\" fill=\"transparent\" style=\"filter: drop-shadow(8px 6px 6px gray);\">\n box rounded\n  <\/rect>\n<\/svg>\n","protected":false},"excerpt":{"rendered":"<p>shadow (like css shadow-box) At least with Firefox you can use a filter, like the following: rounded corner The simplest way to round the corners of a box is to use rect element with rx and ry attributes (such as rx=&#8221;20&#8243; ry=&#8221;20&#8243;) and define the style of rect with stroke-linejoin:round; and something like stroke:[your color]; &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/digitalia.culturanuova.net\/blog\/?p=2306\" class=\"more-link\">Leggi tutto<span class=\"screen-reader-text\"> &#8220;svg rounded corner and shadow&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[570,631,565,566],"tags":[661,23],"class_list":["post-2306","post","type-post","status-publish","format-standard","hentry","category-browsers","category-graphics","category-office","category-webmaster","tag-rounded-corner","tag-svg"],"_links":{"self":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2306","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2306"}],"version-history":[{"count":10,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2306\/revisions"}],"predecessor-version":[{"id":2318,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2306\/revisions\/2318"}],"wp:attachment":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}