SVG Stripe Pattern as Element Background-Image

MR.ABC

How is it possible to get the following shape as a svg graphic. I like to use it as a background-image with repeat. The problem are the box corners.

enter image description here

I don't know how to avoid the rectangular ends of each line.

<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px">
<style type="text/css">
    <![CDATA[
        path {
            stroke-antialiasing:true
            fill: none;
            stroke: #000;
            stroke-width: 2px;
            opacity: 0.1;
        }
    ]]>
</style>
<path d="M4 0 0 4"/>
<path d="M8 4 4 8"/>

Preview

enter image description here

Francis Hemsher

The default stroke-linecap is 'butt", add to uour style: stroke-linecap: square;

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related