{"id":5407,"date":"2020-09-27T15:47:12","date_gmt":"2020-09-27T13:47:12","guid":{"rendered":"https:\/\/whitepapers.grafik-und-redaktion.de\/?p=5407"},"modified":"2020-09-27T15:49:34","modified_gmt":"2020-09-27T13:49:34","slug":"css-shapes-how-to-add-border-in-my-clip-path-polygon-css-style-stack-overflow","status":"publish","type":"post","link":"https:\/\/whitepapers.grafik-und-redaktion.de\/?p=5407","title":{"rendered":"css shapes &#8211; How to add border in my clip-path: polygon(); CSS style &#8211; Stack Overflow"},"content":{"rendered":"<blockquote><p>Are there any alternate ways to create such a border effect?We can mimic it by applying the same clip-path on a container element. The container element&#8217;s background color will look as though it is the border of the inner element because both are clipped and the container has slightly higher dimensions than the inner element.<\/p><\/blockquote>\n<pre class=\"lang:css decode:true crayon-selected\">.poligon {\r\n  display: inline-block;\r\n  position: relative;\r\n  width: 150px;\r\n  height: 150px;\r\n  background: red;\r\n  box-sizing: border-box;\r\n  -webkit-clip-path: ;\r\n  clip-path: ;\r\n}\r\n.poligon img {\r\n  position: absolute;\r\n  top: 2px; \/* equal to border thickness *\/\r\n  left: 2px; \/* equal to border thickness *\/\r\n  width: 146px; \/* container height - (border thickness * 2) *\/\r\n  height: 146px; \/* container height - (border thickness * 2) *\/\r\n -webkit-clip-path: ;\r\n  clip-path: ;\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>Quelle: <em><a href=\"https:\/\/stackoverflow.com\/questions\/31854185\/how-to-add-border-in-my-clip-path-polygon-css-style\">css shapes &#8211; How to add border in my clip-path: polygon(); CSS style &#8211; Stack Overflow<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are there any alternate ways to create such a border effect?We can mimic it by applying the same clip-path on a container element. The container element&#8217;s background color will look as though it is the border of the inner element &hellip; <a href=\"https:\/\/whitepapers.grafik-und-redaktion.de\/?p=5407\">Weiterlesen &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/posts\/5407"}],"collection":[{"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5407"}],"version-history":[{"count":4,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/posts\/5407\/revisions"}],"predecessor-version":[{"id":5411,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/posts\/5407\/revisions\/5411"}],"wp:attachment":[{"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}