<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="xxxx.css"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http:/awww.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="10cm" height="10cm" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="40" height="60"/> <rect x="30" y="30" width="40" height="60"/> </svg> |
|
xxxx.css
rect {
fill: teal; stroke: navy; stroke-opacity: 0.2; fill-opacity: 0.7; } |
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="xxxx.css"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http:/awww.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="10cm" height="10cm" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <rect class="c_rect1" x="10" y="10" width="40" height="60"/> <rect class="c_rect2" x="30" y="30" width="40" height="60"/> </svg> |
|
xxxx.css
.c_rect1 {
fill: orange; fill-opacity: 0.8; } .c_rect2 { fill: none; stroke: forestgreen; stroke-width: 3; stroke-opacity: 0.3; } |
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http:/awww.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="10cm" height="10cm" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <rect x="30" y="30" width="40" height="60"/> <rect x="10" y="10" width="40" height="60" style="fill:gray; stroke=red; fill-opacity:0.4;"/> </svg> |