【HTML5】SVG——rect

来源:互联网 发布:k近邻算法 编辑:程序博客网 时间:2024/06/01 07:52
<!DOCTYPE html><html><body><svg width="200px" height="200px" viewBox="0 0 200 200">  <!-- black interior, no outline -->  <rect x="10" y="10" width="30" height="50"/>  <!-- no interior, black outline -->  <rect x="50" y="10" width="20" height="40"    style="fill: none; stroke: black;"/>  <!-- blue interior, thick semi-transparent red outline -->  <rect x="10" y="70" width="25" height="30"    style="fill: #0000ff;      stroke: red; stroke-width: 7; stroke-opacity: 0.5;"/>  <!-- semi-transparent yellow interior, dashed green outline -->  <rect x="50" y="70" width="35" height="20"    style="fill: yellow; fill-opacity: 0.5;      stroke: green; stroke-width: 2; stroke-dasharray: 5 2"/></svg></body></html>

0 0
原创粉丝点击