Adding images in circle charts - html
I've made circle charts for my skills, but I want to add images inside the charts.
But without using any Javascript code.
I got it from here :https://codepen.io/maoberlehner/pen/jwVWQz?editors=1100
.circle-chart__circle {
animation: circle-chart-fill 3s reverse; /* 1 */
transform: rotate(-90deg); /* 2, 3 */
transform-origin: center; /* 4 */
background: red;
}
.circle-chart__info {
animation: circle-chart-appear 2s forwards;
opacity: 0;
transform: translateY(0.3em);
}
#keyframes circle-chart-fill {
to { stroke-dasharray: 0 100; }
}
#keyframes circle-chart-appear {
to {
opacity: 1;
transform: translateY(0);
}
}
#media (min-width: 31em) {
.grid {
grid-template-columns: repeat(1, 1fr);
}
}
<div class="col-sm-6">
<h2>Python 3</h2>
<svg class="circle-chart" viewbox="0 0 33.83098862 33.83098862" width="200" height="200">
<circle class="circle-chart__background" stroke="#efefef" stroke-width="2" fill="none" cx="16.91549431" cy="16.91549431" r="15.91549431" />
<circle class="circle-chart__circle" stroke="#1990bf" stroke-width="2" stroke-dasharray="85,100" stroke-linecap="round" fill="none" cx="16.91549431" cy="16.91549431" r="15.91549431" />
</svg>
</div>
To display a picture in svg, use tag <image> in conjunction with the tag <pattern>, which defines as id.
Next, install rule fill="url(#img)" with the id, inside which there is a tag with an image.
<defs>
<pattern id="img" patternUnits="userSpaceOnUse" height="100" width="100">
<image x="0" y="0" height="100%" width="100%" xlink:href="https://static3.depositphotos.com/1000992/133/i/600/depositphotos_1337508-stock-photo-a-free-flying-white-dove.jpg"></image>
</pattern>
</defs>
Also remove fill="none" from the first <circle> shadow. This will prevent the image from being displayed.
.circle-chart__circle {
animation: circle-chart-fill 3s reverse; /* 1 */
transform: rotate(-90deg); /* 2, 3 */
transform-origin: center; /* 4 */
background: red;
}
.circle-chart__info {
animation: circle-chart-appear 2s forwards;
opacity: 0;
transform: translateY(0.3em);
}
#keyframes circle-chart-fill {
to { stroke-dasharray: 0 100; }
}
#keyframes circle-chart-appear {
to {
opacity: 1;
transform: translateY(0);
}
}
#media (min-width: 31em) {
.grid {
grid-template-columns: repeat(1, 1fr);
}
}
<div class="col-sm-6">
<h2>Python 3</h2>
<svg class="circle-chart" viewbox="0 0 33.83098862 33.83098862" width="200" height="200">
<defs>
<pattern id="img" patternUnits="userSpaceOnUse" height="100" width="100">
<image x="0" y="0" height="100%" width="100%" xlink:href="https://static3.depositphotos.com/1000992/133/i/600/depositphotos_1337508-stock-photo-a-free-flying-white-dove.jpg"></image>
</pattern>
</defs>
<circle class="circle-chart__background" stroke="#efefef" stroke-width="2" cx="16.91549431" cy="16.91549431" r="15.91549431" fill="url(#img)"/>
<circle class="circle-chart__circle" stroke="#1990bf" stroke-width="2" stroke-dasharray="85,100" stroke-linecap="round" fill="none" cx="16.91549431" cy="16.91549431" r="15.91549431" />
</svg>
</div>
Related
CSS Animated Radial Graph overflow after animation SVG
I've encountered a problem when using the css disarray function. The "front" circle clips over after animation has finished and doesnt "Start" at origin point of the animation. After the animation has completed, the filled stroke clips back past the origin point. Can someone Please help me out - I've tried reading up on SVG elements and have fiddled with the code for a few hours now and I still cant get it to animate properly. Thank you so much for your support. Here is the code I am working with. .radial-graph-container { display: flex; justify-content: center; flex-direction: column; padding-bottom: 2.4rem; } .radial-graph-container .chart-container .back { stroke: #101114; stroke-width: 10; } .radial-graph-container .chart-container .front { stroke: #94d82d; stroke-width: 15; stroke-dasharray: 210; /* Works fine with values above 300 */ transform: rotate(-90deg); transform-origin: center; } .front { animation: fill 1s reverse; } <div class="radial-graph-container"> <svg width="200" height="200" class="chart-container"> <circle cx="100" cy="100" r="90" class="back" fill="none" /> <circle cx="100" cy="100" r="90" class="front" fill="none" /> <g class="graph-center-txt"> <text x="100" y="100" alignment-baseline="central" text-anchor="middle" id="percentage-social-media-usage" > 42% </text> </g> </svg> <p class="graph-info-txt"> Description Text Here </p> </div>
Your animation part was missing: (the #keyframes section) .radial-graph-container { display: flex; justify-content: center; flex-direction: column; padding-bottom: 2.4rem; } .radial-graph-container .chart-container .back { stroke: #101114; stroke-width: 10; } .radial-graph-container .chart-container .front { stroke: #94d82d; stroke-width: 15; stroke-dasharray: 210; /* Works fine with values above 300 */ transform: rotate(-90deg); transform-origin: center; } .front { animation: fill 1s reverse; } #keyframes fill { 0% { r: 90; } 100% { r: 0; } } <div class="radial-graph-container"> <svg width="200" height="200" class="chart-container"> <circle cx="100" cy="100" r="90" class="back" fill="none" /> <circle cx="100" cy="100" r="90" class="front" fill="none" /> <g class="graph-center-txt"> <text x="100" y="100" alignment-baseline="central" text-anchor="middle" id="percentage-social-media-usage" > 42% </text> </g> </svg> <p class="graph-info-txt"> Description Text Here </p> </div>
Trouble making an HTML SVG Splash screen
I'm trying to create an animated splash screen for my APP and I have to do it using SVG, HTML and CSS due to the architecture of the APP. The first GIF is the designed product which I'm trying to achieve and the second GIF is what I've been able to do. I need help trying to create that circle effect (I have tried using <circle> but I cant get it to do the effect correctly. I also need to do the zoom in/out of the text and have the background color cover the whole screen. This is what I have: #keyframes fill { 0% { fill: white; } 50% { fill: black; } 100% { fill: white; } } #jazztel { fill: white; animation-name: fill; animation-duration: 5s; } #keyframes colorChange { 0% { fill: #da1884; } 50% { fill: #ffffff; } 100% { fill: #ffcd00; } } .box { fill: #ffcd00; width: 100%; height: 100%; animation: colorChange 5s; } #keyframes buttonTransition { 0% { transform: scale(0); } 50% { transform: scale(1); visibility: none; opacity: 0; display: none; } 100% { transform: scale(0); } } .innerCircle { animation-duration: 3s; animation-name: buttonTransition; transform-origin: center center; } <svg width="100%" height="100%" viewBox="0 0 1131 1247" fill="none" xmlns="http://www.w3.org/2000/svg"> <rect class="box" /> <!--<circle class="innerCircle" cx="50%" cy="50%" r="50%" fill="#FFFFFF" />--> <path id="jazztel" d="M596.912 674.306V665.289H578.926L598.296 631.994H565.437V641.011H581.693L562.669 674.306H596.912Z" /> <path id="jazztel" d="M670.931 653.497C670.931 646.561 668.856 641.012 664.705 636.503C660.554 632.341 655.02 629.913 648.448 629.913C641.877 629.913 636.688 631.994 632.538 636.503C628.387 640.665 626.312 646.214 626.312 652.803C626.312 659.393 628.387 664.595 632.884 668.757C637.034 672.919 642.568 675 649.14 675C657.442 675 664.013 671.879 668.164 665.636L659.171 661.474C656.404 664.249 652.945 665.636 648.794 665.636C645.681 665.636 642.914 664.942 640.839 663.208C638.764 661.474 637.38 659.046 636.688 655.925H670.931V653.497ZM637.034 646.908C638.072 644.133 639.455 642.399 640.839 641.358C642.914 639.624 645.681 638.931 648.794 638.931C651.561 638.931 653.637 639.624 655.712 641.012C657.787 642.399 659.171 644.48 659.863 646.908H637.034Z" /> <path id="jazztel" d="M687.534 615H676.811V673.96H687.534V615Z" /> <path id="jazztel" d="M528.081 631.994V641.011H544.683L525.314 674.306H559.902V665.289H541.57L560.94 631.994H528.081Z" /> <path id="jazztel" d="M519.433 648.295C519.087 646.908 518.741 645.52 518.05 644.133C516.666 641.359 515.283 638.931 513.207 636.85C511.132 634.769 508.711 633.035 505.944 631.994C504.56 631.301 503.177 630.954 501.793 630.607C500.409 630.26 499.026 630.26 497.296 630.26C494.183 630.26 491.416 630.954 488.995 631.994C487.612 632.688 486.574 633.382 485.536 634.075C484.499 634.769 483.461 635.81 482.423 636.85C481.386 637.89 480.694 638.931 480.002 640.318C478.619 641.705 477.927 642.746 477.581 644.133C476.889 645.52 476.543 646.908 476.197 648.295C475.852 649.682 475.852 651.416 475.852 652.804C475.852 655.925 476.543 658.7 477.581 661.127C478.273 662.515 478.965 663.555 479.656 664.596C480.348 665.636 481.386 666.677 482.077 667.717C483.115 668.758 484.153 669.451 485.19 670.492C486.228 671.185 487.612 671.879 488.649 672.573C491.071 673.613 493.838 674.307 496.605 674.307H519.779V652.804C519.779 651.416 519.433 650.029 519.433 648.295ZM509.748 664.249H497.296C495.913 664.249 494.529 663.902 493.146 663.208C492.454 662.862 491.762 662.515 491.416 662.168C490.725 661.821 490.379 661.127 489.687 660.781C489.341 660.087 488.649 659.74 488.303 659.047C487.958 658.353 487.612 657.659 487.266 656.966C486.574 655.578 486.228 654.191 486.228 652.457C486.228 651.763 486.228 650.723 486.574 650.029C486.574 649.336 486.92 648.642 487.266 647.948C487.612 647.255 487.958 646.561 488.303 645.867C488.649 645.174 488.995 644.827 489.687 644.133C490.379 643.44 490.725 643.093 491.416 642.746C492.108 642.399 492.8 642.052 493.146 641.705C494.529 641.012 496.259 640.665 497.642 640.665C498.334 640.665 499.372 640.665 500.064 641.012C500.755 641.012 501.447 641.359 502.139 641.705C503.522 642.399 504.906 643.093 505.944 644.48C506.981 645.521 508.019 646.908 508.711 648.295C509.057 648.989 509.402 649.682 509.402 650.376C509.402 651.07 509.748 652.11 509.748 652.804V664.249Z" /> <path id="jazztel" d="M469.972 615.693H458.903V655.924C458.903 655.924 458.903 659.739 458.557 660.78C458.212 662.861 457.174 663.901 455.444 663.901C453.023 663.901 450.256 662.167 447.489 658.699L439.534 666.676C444.03 672.225 449.564 675 455.79 675C458.903 675 461.67 674.306 463.746 672.919C466.513 671.185 468.242 668.41 469.28 664.595C469.626 662.514 469.972 659.046 469.972 654.19V615.693Z" /> <path id="jazztel" d="M616.281 631.647V615.693H605.559V638.93L605.213 640.664H605.559V674.306H616.281V640.664H622.507V631.647H616.281Z" /> </svg>
Ive managed to solve all my problems, below you can find the snippet of the working version. I removed my <rect> tag and instead created a <div> to wrap the SVG and added a background to that to solve the problem where the background was not filling up the whole screen. To solve the zoom issue on the text what I did was implemented a transform: scale(x) to the same div mentioned above instead of the text which are several paths (if applied to the path it wouldnt do the effect correctly). So instead of zooming in and out on the text the effect is like if I had a painting in my hand and I brought it closer to your face. And last is the <circle> effect. I removed the background color in the HTML tag and added it to the #keyframes in CSS. #keyframes textColorChange { 0% { fill: white; } 50% { fill: black; } 100% { fill: white; } } #jazztel { fill: white; animation-name: textColorChange; animation-duration: 5s; } #keyframes bgColorChange { 0% { background-color: #da1884; transform: scale(1); } 50% { background-color: #ffffff; transform: scale(1.5); } 100% { background-color: #ffcd00; transform: scale(1); } } .splashBackground { background-color: #ffcd00; width: 100%; height: 100%; animation: bgColorChange 5s; } #keyframes circleTransition { 0% { transform: scale(0); fill: #FFFFFF; } 50% { transform: scale(1); } 100% { transform: scale(0); } } .innerCircle { animation-duration: 3s; animation-name: circleTransition; transform-origin: center center; } <div class="splashBackground"> <svg width="100%" height="100%" viewBox="0 0 1131 1247" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle class="innerCircle" cx="50%" cy="50%" r="50%" /> <path id="jazztel" d="M596.912 674.306V665.289H578.926L598.296 631.994H565.437V641.011H581.693L562.669 674.306H596.912Z" /> <path id="jazztel" d="M670.931 653.497C670.931 646.561 668.856 641.012 664.705 636.503C660.554 632.341 655.02 629.913 648.448 629.913C641.877 629.913 636.688 631.994 632.538 636.503C628.387 640.665 626.312 646.214 626.312 652.803C626.312 659.393 628.387 664.595 632.884 668.757C637.034 672.919 642.568 675 649.14 675C657.442 675 664.013 671.879 668.164 665.636L659.171 661.474C656.404 664.249 652.945 665.636 648.794 665.636C645.681 665.636 642.914 664.942 640.839 663.208C638.764 661.474 637.38 659.046 636.688 655.925H670.931V653.497ZM637.034 646.908C638.072 644.133 639.455 642.399 640.839 641.358C642.914 639.624 645.681 638.931 648.794 638.931C651.561 638.931 653.637 639.624 655.712 641.012C657.787 642.399 659.171 644.48 659.863 646.908H637.034Z" /> <path id="jazztel" d="M687.534 615H676.811V673.96H687.534V615Z" /> <path id="jazztel" d="M528.081 631.994V641.011H544.683L525.314 674.306H559.902V665.289H541.57L560.94 631.994H528.081Z" /> <path id="jazztel" d="M519.433 648.295C519.087 646.908 518.741 645.52 518.05 644.133C516.666 641.359 515.283 638.931 513.207 636.85C511.132 634.769 508.711 633.035 505.944 631.994C504.56 631.301 503.177 630.954 501.793 630.607C500.409 630.26 499.026 630.26 497.296 630.26C494.183 630.26 491.416 630.954 488.995 631.994C487.612 632.688 486.574 633.382 485.536 634.075C484.499 634.769 483.461 635.81 482.423 636.85C481.386 637.89 480.694 638.931 480.002 640.318C478.619 641.705 477.927 642.746 477.581 644.133C476.889 645.52 476.543 646.908 476.197 648.295C475.852 649.682 475.852 651.416 475.852 652.804C475.852 655.925 476.543 658.7 477.581 661.127C478.273 662.515 478.965 663.555 479.656 664.596C480.348 665.636 481.386 666.677 482.077 667.717C483.115 668.758 484.153 669.451 485.19 670.492C486.228 671.185 487.612 671.879 488.649 672.573C491.071 673.613 493.838 674.307 496.605 674.307H519.779V652.804C519.779 651.416 519.433 650.029 519.433 648.295ZM509.748 664.249H497.296C495.913 664.249 494.529 663.902 493.146 663.208C492.454 662.862 491.762 662.515 491.416 662.168C490.725 661.821 490.379 661.127 489.687 660.781C489.341 660.087 488.649 659.74 488.303 659.047C487.958 658.353 487.612 657.659 487.266 656.966C486.574 655.578 486.228 654.191 486.228 652.457C486.228 651.763 486.228 650.723 486.574 650.029C486.574 649.336 486.92 648.642 487.266 647.948C487.612 647.255 487.958 646.561 488.303 645.867C488.649 645.174 488.995 644.827 489.687 644.133C490.379 643.44 490.725 643.093 491.416 642.746C492.108 642.399 492.8 642.052 493.146 641.705C494.529 641.012 496.259 640.665 497.642 640.665C498.334 640.665 499.372 640.665 500.064 641.012C500.755 641.012 501.447 641.359 502.139 641.705C503.522 642.399 504.906 643.093 505.944 644.48C506.981 645.521 508.019 646.908 508.711 648.295C509.057 648.989 509.402 649.682 509.402 650.376C509.402 651.07 509.748 652.11 509.748 652.804V664.249Z" /> <path id="jazztel" d="M469.972 615.693H458.903V655.924C458.903 655.924 458.903 659.739 458.557 660.78C458.212 662.861 457.174 663.901 455.444 663.901C453.023 663.901 450.256 662.167 447.489 658.699L439.534 666.676C444.03 672.225 449.564 675 455.79 675C458.903 675 461.67 674.306 463.746 672.919C466.513 671.185 468.242 668.41 469.28 664.595C469.626 662.514 469.972 659.046 469.972 654.19V615.693Z" /> <path id="jazztel" d="M616.281 631.647V615.693H605.559V638.93L605.213 640.664H605.559V674.306H616.281V640.664H622.507V631.647H616.281Z" /> </svg> </div> https://jsfiddle.net/ty6qwcnm/
How can I cut a hole in an SVG, making every <path> that goes over that hole transparent
Considering the following example: path { transform-origin: 50% 0%; } #keyframes path0 { 0% { transform: rotate(-10deg); } 100% { transform: rotate(10deg); } } #keyframes path1 { 0% { transform: rotate(-30deg); } 100% { transform: rotate(30deg); } } #keyframes path2 { 0% { transform: rotate(40deg); } 100% { transform: rotate(-40deg); } } .background--custom { height: 100%; width: 100%; background-color: red; } <svg class="background--custom" id="demo" viewBox="0 0 100 100" preserveAspectRatio="none"> <path fill="#D6D6D6" fill-opacity="1" d="M-100 -100L200 -100L200 50L-100 50Z" style="animation: path0 5s linear infinite alternate;" /> <path fill="#DEFFFF" fill-opacity="1" d="M-100 -100L200 -100L200 50L-100 50Z" style="animation: path1 5s linear infinite alternate;" /> <path fill="#DAFFF5" fill-opacity="1" d="M-100 -100L200 -100L200 20L-100 20Z" style="animation: path2 5s linear infinite alternate;" /> </svg> This creates an animates SVG background. It looks like this: Its simply a few lines that rotate. The goal is to cut a rectangle hole in the whole SVG, causing a section of the SVG to be transparent. Considering the black rectangle would be the hole, it should look something like this: Is this in any way possible? I have tried using mask elements but I dont see how I can apply those mask elements to the whole SVG and not just single path element.
Here I made a <mask> on a <g> element that has a white <rect> in the background and a black <rect> in the foreground. The black square makes the group transparent. The result is that you can see the red color in the background -- I don't know if that was the point? path { transform-origin: 50% 0%; } #keyframes path0 { 0% { transform: rotate(-10deg); } 100% { transform: rotate(10deg); } } #keyframes path1 { 0% { transform: rotate(-30deg); } 100% { transform: rotate(30deg); } } #keyframes path2 { 0% { transform: rotate(40deg); } 100% { transform: rotate(-40deg); } } .background--custom { height: 100%; width: 100%; background-color: red; } <svg class="background--custom" id="demo" viewBox="0 0 100 100" preserveAspectRatio="none"> <defs> <mask id="mask01"> <rect width="100" height="100" fill="white"/> <rect width="60" height="60" x="20" y="40" fill="black"/> </mask> </defs> <g mask="url(#mask01)"> <path fill="#D6D6D6" fill-opacity="1" d="M-100 -100L200 -100L200 50L-100 50Z" style="animation: path0 5s linear infinite alternate;" /> <path fill="#DEFFFF" fill-opacity="1" d="M-100 -100L200 -100L200 50L-100 50Z" style="animation: path1 5s linear infinite alternate;" /> <path fill="#DAFFF5" fill-opacity="1" d="M-100 -100L200 -100L200 20L-100 20Z" style="animation: path2 5s linear infinite alternate;" /> </g> </svg>
CSS-transform in Edge not working as intended
I have an svg illustration of a drone and I want the propellers to be rotating. The animation works perfectly fine in Chrome and Firefox but in Edge the rotation center is weird. It probably has to do with the transform-origin: center property but I have no idea how to correct it because it does work in Firefox/Chrome. .drone .body { fill: #000000; } .drone .wing { fill: #000000; animation: wing 5s linear forwards infinite; transform-box: fill-box; transform-origin: center; } #keyframes wing { 100% { transform: rotateY(7200deg); } } <svg id="drone1" class="drone" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1923 643" preserveAspectRatio="xMinYMin meet"> <g id="drone1-droneContainer"> <g class="wing left"> <path d="M13,2c-0.6,0-1-0.4-1-1s0.4-1,1-1s8,0.4,8,1S13.6,2,13,2z"/> <path d="M8,2C7.4,2,0,1.6,0,1s7.4-1,8-1s1,0.4,1,1S8.6,2,8,2z"/> </g> <g class="wing right"> <path d="M48,2c-0.6,0-1-0.4-1-1s0.4-1,1-1s8,0.4,8,1S48.6,2,48,2z"/> <path d="M43,2c-0.6,0-8-0.4-8-1s7.4-1,8-1s1,0.4,1,1S43.6,2,43,2z"/> </g> <g class="body"> <path d="M45,0.5C45,0.2,45.2,0,45.5,0S46,0.2,46,0.5V4c0.6,0,1,0.4,1,1v1h0.5C48.3,6,49,6.7,49,7.5S48.3,9,47.5,9H37v0.9 c0,0.7-0.4,1.4-1,1.7l-3.6,2.1c-0.3,0.2-0.7,0.3-1,0.3h-6.9c-0.4,0-0.7-0.1-1-0.3L20,11.6c-0.6-0.4-1-1-1-1.7V9H8.5 C7.7,9,7,8.3,7,7.5S7.7,6,8.5,6H9V5c0-0.6,0.4-1,1-1V0.5C10,0.2,10.2,0,10.5,0C10.8,0,11,0.2,11,0.5V4c0.6,0,1,0.4,1,1v1h7l0,0 c0.1-0.6,0.4-1.2,1-1.6l3.6-2.1c0.3-0.2,0.7-0.3,1-0.3h6.9c0.4,0,0.7,0.1,1,0.3L36,4.4C36.6,4.8,37,5.3,37,6l7,0V5 c0-0.6,0.4-1,1-1V0.5z"/> </g> </g> </svg>
The issue is with transform-box. This is an experimental CSS property which is not supported by Microsoft Edge. I didn't find workaround for transform-box on Microsoft Edge, so I can only give you a suggestion to replace the svg with gif picture on Microsoft Edge like this: .drone .body { fill: #000000; } .drone .wing { fill: #000000; animation: wing 5s linear forwards infinite; transform-box: fill-box; transform-origin: center; } #keyframes wing { 100% { transform: rotateY(7200deg); } } #supports (-ms-ime-align: auto) { /* Edge 12+ CSS styles go here */ #pic { display: block; } #drone1 { display: none; } } #media screen and (-webkit-min-device-pixel-ratio:0) and (min-resolution:.001dpcm) { /* Chrome 29+ CSS styles go here */ #pic { display: none; } #drone1 { display: block; } } <img id="pic" src="https://i.stack.imgur.com/9yOqm.gif" /> <svg id="drone1" class="drone" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1923 643" preserveAspectRatio="xMinYMin meet"> <g id="drone1-droneContainer"> <g class="wing left"> <path d="M13,2c-0.6,0-1-0.4-1-1s0.4-1,1-1s8,0.4,8,1S13.6,2,13,2z" /> <path d="M8,2C7.4,2,0,1.6,0,1s7.4-1,8-1s1,0.4,1,1S8.6,2,8,2z" /> </g> <g class="wing right"> <path d="M48,2c-0.6,0-1-0.4-1-1s0.4-1,1-1s8,0.4,8,1S48.6,2,48,2z" /> <path d="M43,2c-0.6,0-8-0.4-8-1s7.4-1,8-1s1,0.4,1,1S43.6,2,43,2z" /> </g> <g class="body"> <path d="M45,0.5C45,0.2,45.2,0,45.5,0S46,0.2,46,0.5V4c0.6,0,1,0.4,1,1v1h0.5C48.3,6,49,6.7,49,7.5S48.3,9,47.5,9H37v0.9 c0,0.7-0.4,1.4-1,1.7l-3.6,2.1c-0.3,0.2-0.7,0.3-1,0.3h-6.9c-0.4,0-0.7-0.1-1-0.3L20,11.6c-0.6-0.4-1-1-1-1.7V9H8.5 C7.7,9,7,8.3,7,7.5S7.7,6,8.5,6H9V5c0-0.6,0.4-1,1-1V0.5C10,0.2,10.2,0,10.5,0C10.8,0,11,0.2,11,0.5V4c0.6,0,1,0.4,1,1v1h7l0,0 c0.1-0.6,0.4-1.2,1-1.6l3.6-2.1c0.3-0.2,0.7-0.3,1-0.3h6.9c0.4,0,0.7,0.1,1,0.3L36,4.4C36.6,4.8,37,5.3,37,6l7,0V5 c0-0.6,0.4-1,1-1V0.5z" /> </g> </g> </svg>
What version is your edge browser? Transform-Origin should be supported Another way for you to fix this, might be the use of cssSandpaper
strokes above an SVG for some reason
I have an SVG I made, now it has a couple of blocks that move in a straight line. sometimes when the blocks move it just adds a stroke above them, although I have stroke disabled. NOTE: if you look closer you can see the orange strokes above the blocks here's what it looks like. #keyframes move { 0% { transform: translate3d(250px , 0px , 0px); } 50% { transform: translate3d(-200px , 0px , 0px); } 100% { transform: translate3d(250px , 0px , 0px); } } #loading_bar .cls-2 { stroke: none; transition: transform 2s ease-in-out; animation: move 4s infinite forwards; } <svg id="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080"> <defs> <style> .cls-1{fill:#64b2c1;} .cls-2{fill:orange;} .cls-3{fill:transparent;stroke-miterlimit:10;} .cls-4{fill:#191919;} </style> </defs> <g id="background"> <rect class="cls-1" width="1920" height="1080"/> <rect class="cls-2" x="871" y="769" width="90" height="84"/> </g> <g id="loading_bar"> <rect class="cls-4" x="545" y="769" width="792" height="84"/> <rect class="cls-2" x="789" y="789" width="40" height="40"/> <rect class="cls-2" x="988" y="789" width="40" height="40"/> <rect class="cls-2" x="888" y="789" width="40" height="40"/></g></svg>