SVG的基础使用:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Title</title>
</head>
<body>
<!-- <svg width="140" height="170" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Cat</title>
<desc>Stick Figure of a Cat.</desc>
<circle cx="70" cy="95" r="50" style="stroke:black;fill:none"></circle>
<circle cx="55" cy="80" r="5" style="stroke:black;fill:#339933"></circle>
<circle cx="85" cy="80" r="5" style="stroke:black;fill:#339933"></circle>
<g id="whiskers">
<line x1="75" y1="95" x2="135" y2="85" style="stroke:black"></line>
<line x1="75" y1="95" x2="135" y2="135" style="stroke:black"></line>
</g>
<use xlink:href="#whiskers" transform="scale(-1 1) translate(-140 0)" />
<polyline points="108 62,90 10,70 45,50 10,32,62" style="stroke:black;fill:none"></polyline>
<polyline points="35 110,45 120,95 120,105,110" style="stroke:black;fill:none"></polyline>
<path d="M 75 90 L 65 90 A 5 10 0 0 0 75 90" style="stroke:black;fill:#ffcccc"></path>
<text x="60" y="165" style="font-family:sans-serif;font-size:14pt;stroke:none;fill:black">Cat</text>
</svg>
<svg width="4cm" height="5cm" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 64 80">
<rect x="10" y="35" width="40" height="40" style="stroke:black;fill:none"></rect>
<polyline points="10 35,30 7.68,50 35" style="stroke:black;fill:none"></polyline>
<polyline points="30 75,30 55,40 55,40 75" style="stroke:black;fill:none"></polyline>
</svg>
-->
<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg" >
<line x1="10" y1="10" x2="200" y2="10" style="stroke:black;stroke-width:5;" />
<line x1="10" y1="20" x2="200" y2="20" style="stroke:black;stroke-dasharray:9,5;" />
<line x1="10" y1="30" x2="200" y2="30" style="stroke:#9f9;stroke-width:5;" />
<line x1="10" y1="40" x2="200" y2="40" style="stroke:rgb(255,128,64);stroke-width:5;" />
<line x1="10" y1="50" x2="200" y2="50" style="stroke:rgb(60%,20%,60%);stroke-width:5;" />
<line x1="10" y1="60" x2="200" y2="60" style="stroke:rgb(60%,20%,60%);stroke-width:5;stroke-opacity:0.1" />
<rect x="10" y="70" width="30" height="50" style="stroke:black;fill:none;" />
<rect x="50" y="70" width="30" height="50" style="stroke:black;stroke-width:2;stroke-opacity:0.5;stroke-dasharray:9,5;fill:#9f9;fill-opacity:0.5" />
<rect x="90" y="70" width="30" height="50" ry="10" style="stroke:black;fill:none;" />
<ellipse cx="150" cy="100" rx="10" ry="20" style="stroke:black;fill:none;" />
<polygon points="15,150 55,150 45,160 5,160" style="stroke:black;fill:none;" />
    <polyline points="5 20,20 20,25 10,35 30,45 10,55 30,65 10,75 30,80 20,95 20" style="stroke:black;fill:none;" />
</svg>
</body>
</html>

SVG的基础使用的更多相关文章

  1. SVG.js 基础图形绘制整理(二)

    一.折线 var draw = SVG('svg1').size(300, 300); //画折线 //使用字符串点 // var polyline=draw.polyline('0,0 100,50 ...

  2. 数据可视化-svg入门基础(二)

    接上一篇:数据可视化-svg入门基础(一),基础一主要是介绍了svg概念,元素样式设置等. svg是(scalable vector graphic)伸缩矢量图像. 一.目录 (1)图形元素 (2)文 ...

  3. SVG.js 基础图形绘制整理(一)

    一.矩形 //指定width和height 画矩形 //返回rect对象 var draw = SVG('svg1').size(300, 300); var rect = draw.rect(100 ...

  4. 数据可视化系列--svg入门基础(一)

    一.前言 1.SVG(Scalable Vector Graphics)可伸缩矢量图形 特点: (1)使用xml格式来定义图形: (2)用来定义web上的使用的矢量图: (3)改变图像尺寸,图片质量不 ...

  5. Canvas和SVG的基础知识,以及两者的区别(小白)

    首先我们来说一下Canvas是什么,它有什么作用以及它的知识点. Canvas是<HTML5>的新标签,它通常用于通过脚本(也就是JavaScript)来绘制图像.但是它本身并没有绘制能力 ...

  6. SVG系列 - 基础

    标题为SVG基础,但是过于基础的东西就不再熬述啦,可以参考几个学习网址: SVG参考手册:http://www.runoob.com/svg/svg-reference.html MDN SVG:ht ...

  7. SVG动画-基础篇

    参考资料: http://www.w3school.com.cn/svg/index.asp https://msdn.microsoft.com/zh-cn/library/gg193979 简介 ...

  8. 可视化:svg相关基础

    01.svg的嵌入.html <!DOCTYPE html> <html lang="en"> <head> <meta charset= ...

  9. SVG动画基础篇

    参考资料: http://www.w3school.com.cn/svg/index.asp https://msdn.microsoft.com/zh-cn/library/gg193979  gi ...

随机推荐

  1. CodeForces 158DIce Sculptures(枚举)

    一个暴力的枚举,枚举组成正多边形需要对应覆盖原先的几条边,范围为(1,n/3),然后维护最大值就可以了,注意初始化为-inf. #include<stdio.h> #include< ...

  2. 序列化为XML

    java类序列化成xml 方法[转] 今天看了下JAVA序列化.还是一知半解.怎么也没有弄明白,怎么序列化成XML文件.处入半解状态.在网上找了很多,大部分是理论上的.没有实际的例子.功夫不负有心人, ...

  3. adb shell 命令详解,android

    http://www.miui.com/article-275-1.html http://noobjava.iteye.com/blog/1914348 adb shell 命令详解,android ...

  4. phpstorm9如何配置interpreter

    找到php.exe的路径. 把php.exe 放进去就ok了

  5. C. Bear and Colors

    C. Bear and Colors time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  6. zookeeper启动失败

    集群中3个节点,第一个started,第二个说Starting zookeeper ... already running as process xxxx,第三个说Starting zookeeper ...

  7. String类的两种赋值

    java.lang包是java的默认引入包,所以我们不需显式地导包. String s1 = new String("字符串");//创建2个字符串对象,堆中一个,字符串常量池中一 ...

  8. ACM录 之 输入输出。

    —— 简单介绍一下ACM里面的输入输出... —— 主要说C++的输入输出(其实其他的我不会...). —— C++里面有输入输出流,也就是cin和cout,用起来也算是比较方便吧... —— 但是, ...

  9. jquery全选框的实现

    函数实现的话: head里加入函数实现 <script language="javascript" type="text/javascript"> ...

  10. precision、recall、accuracy的概念

    机器学习中涉及到几个关于错误的概念: precision:(精确度) precision = TP/(TP+FP) recall:(召回率) recall = TP/(TP+FN) accuracy: ...