16 lines
887 B
HTML
16 lines
887 B
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
|
<body>
|
|
<object type="image/svg+xml" data="data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%22100px%22%20height%3D%22100px%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20fill%3D%22green%22%20width%3D%22100px%22%20height%3D%22100px%22%20%2F%3E%3C%2Fsvg%3E" style='background: red'></object><!--
|
|
100px x 100px SVG
|
|
|
|
Code:
|
|
|
|
<svg width="100px" height="100px" xmlns="http://www.w3.org/2000/svg">
|
|
<rect fill='green' width='100px' height='100px' />
|
|
</svg>
|
|
|
|
You should see a 100 x 100 green square above. No red should be visible. <object> tags should treat the width/height attributes on an embeded SVG as the intrinsic size and not default to the CSS default of 300 x 150.
|
|
--></body>
|
|
</html>
|