Categories:
Cloud (204)
Entertainment (11)
Facebook (43)
General (50)
Life (31)
Programming (64)
Technology (398)
Testing (4)
Tools (488)
Twitter (5)
Wearable (26)
Web Design (44)
Collections:
Other Resources:
Default SVG Viewport in HTML "P" Tag
What Is the Default SVG Viewport in an HTML <p> element?
✍: FYIcenter.com
If you have a SVG image with the default Viewport and include it in an HTML <p> element, the width of the Viewport will be set the width of the parent element of the <p> element. This is because <p> an inline element which inherits its parent's width.
Here is a HTML document, viewport-default-2.html, that has a SVG image with the default Viewport included in a HTML "p" element:
<html><body> <p>Enclosed in a "p" element:</p> <svg xmlns="http://www.w3.org/2000/svg" style="background-color: #ffffff" viewBox="0 -100 75 100" preserveAspectRatio="none"> <ellipse cx="0" cy="0" rx="75" ry="100" stroke="blue" stroke-width="20" fill="none"/> </svg> Continue after "p".</p> </body></html>
When you open the above HTML file, viewport-default-2.html, in a Web browser, you see a portion of the ellipse object inside the Viewbox being mapped to a Viewport cross the entire width of the Web page.
⇒ SVG "preserveAspectRatio" Attribute
⇐ What Is the Default SVG Viewport
2023-02-03, 284🔥, 0💬
Popular Posts:
How to edit Mozilla Firefox configuration file? Mozilla Firefox has a configuration file that contro...
How to convert a Word document into an MHTML? I have a nice Word document and want to publish it on ...
How to install Fitbit Bluetooth Dongle on my Windows computer? Fitbit device comes with a Bluetooth ...
Why I am getting the "Opening ChromeSetup.exe" dialog box when trying to install Google Chrome 31 on...
How to convert slide files created with older versions of PowerPoint to the current PowerPoint? I ha...