HTML CSS examples for SVG:Group
add padding to an SVG group
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> rect {<!-- www . j a v a 2 s . co m--> x: 5px; y: 5px; width: calc(50% - 10px); height: calc(50% - 10px); } svg { border: 1px dotted red; width: 100%; display: block; } </style> </head> <body> <svg> <rect /> </svg> </body> </html>