SVG width is not set to screen width
See original GitHub issuehello guys. i want to set screen width for my svg width. this is my simple svg code:
<Svg width={width} height={100} viewBox="0 0 400 800"> <Path d="M 800 300 Q 400 350 0 300 L 0 0 L 800 0 L 800 300 Z"/> </Svg>
but width is not work correctly. i also try width='100%'
but it is not work too.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
SVG not scaling to screen width - WordPress.org
If I create a large SVG image (large as it width is wider than my screen), upload it and insert it to a...
Read more >SVG width is not set to screen width · Issue #1145 - GitHub
hello guys. i want to set screen width for my svg width. this is my simple svg code: <Svg width={width} height={100} viewBox="0 0...
Read more >Width of SVG isn't correct when viewBox is defined
Solution. -For your problem you need to reduce size of viewbox width an height property. But as your image size is ...
Read more >SVG:Sizing - MozillaWiki
The way SVG requires the 'width' and 'height' attributes to be overridden by xxx does not fit well with mapping into style where...
Read more >Intrinsic Sizing - SVG
Issue 1: Allow graphics to scale even with fixed size. Tools often output: <svg width="300px" height="723px">...</svg>. Such an SVG won't scale which is ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Perhaps you want scale to fit? https://www.w3.org/TR/SVG11/coords.html#ViewBoxAttribute And a bit different viewBox value, seems you flipped x and y.
@msand Thank you very much. it is work