SVG的基础使用
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的基础使用的更多相关文章
- SVG.js 基础图形绘制整理(二)
一.折线 var draw = SVG('svg1').size(300, 300); //画折线 //使用字符串点 // var polyline=draw.polyline('0,0 100,50 ...
- 数据可视化-svg入门基础(二)
接上一篇:数据可视化-svg入门基础(一),基础一主要是介绍了svg概念,元素样式设置等. svg是(scalable vector graphic)伸缩矢量图像. 一.目录 (1)图形元素 (2)文 ...
- SVG.js 基础图形绘制整理(一)
一.矩形 //指定width和height 画矩形 //返回rect对象 var draw = SVG('svg1').size(300, 300); var rect = draw.rect(100 ...
- 数据可视化系列--svg入门基础(一)
一.前言 1.SVG(Scalable Vector Graphics)可伸缩矢量图形 特点: (1)使用xml格式来定义图形: (2)用来定义web上的使用的矢量图: (3)改变图像尺寸,图片质量不 ...
- Canvas和SVG的基础知识,以及两者的区别(小白)
首先我们来说一下Canvas是什么,它有什么作用以及它的知识点. Canvas是<HTML5>的新标签,它通常用于通过脚本(也就是JavaScript)来绘制图像.但是它本身并没有绘制能力 ...
- SVG系列 - 基础
标题为SVG基础,但是过于基础的东西就不再熬述啦,可以参考几个学习网址: SVG参考手册:http://www.runoob.com/svg/svg-reference.html MDN SVG:ht ...
- SVG动画-基础篇
参考资料: http://www.w3school.com.cn/svg/index.asp https://msdn.microsoft.com/zh-cn/library/gg193979 简介 ...
- 可视化:svg相关基础
01.svg的嵌入.html <!DOCTYPE html> <html lang="en"> <head> <meta charset= ...
- SVG动画基础篇
参考资料: http://www.w3school.com.cn/svg/index.asp https://msdn.microsoft.com/zh-cn/library/gg193979 gi ...
随机推荐
- phpstorm 格式化代码方法
hpstorm 代码格式化方法: 快捷键:Ctrl + Alt + L 设置代码样式:File -> Settings -> Code Style ->PHP 根据个人php代码规范 ...
- oracle中nvl函数
最近在修改项目中一个统计的bug,统计出的钱数不对,因为不是自己开发的模块,经过分析流程找到了统计的sql. sum(f_msmoney)+sum(f_fkmoney) as total, 上面这段是 ...
- xml 解析 python
1 综述 有很多种解析方法. (1) DOM 缺点是:1 不能解析格式不正确或者不规则xml 2据说只能解析utf-8格式,非utf-8需要转码 与SAX比较,DOM典型的缺点是比较慢,消耗更 ...
- Gson通过借助TypeToken获取泛型参数的类型的方法
最近在使用Google的Gson包进行Json和Java对象之间的转化,对于包含泛型的类的序列化和反序列化Gson也提供了很好的支持,感觉有点意思,就花时间研究了一下. 由于Java泛型的实现机制,使 ...
- nginx 设置进程title
刚好看到nginx设置进程title的源码,因此做一些总结. linux进程实际是以argv[0]处的值来作为进程的title的,因此若需要修改进程的title只需要修改argv[0]处的值即可. 简 ...
- Alcatraz:插件管理
安装: 终端粘贴 "curl -fsSL https://raw.github.com/alcatraz/Alcatraz/master/Scripts/install.sh | sh&qu ...
- 电子工程师名片——FAT16文件系统(转)
源:电子工程师名片——FAT16文件系统 从8月8号开始,连续一个月利用每天下班时间和周末的时间终于初步完成了一个电子工程师的电路板名片,就像U盘一样,不过这个FLASH只有64KB的大小,用的单片机 ...
- 内置Web Server
在终端输入命令:php -S localhost:8000 -t xxx(某个目录或文件) 这个内置的Web服务器主要用于本地开发使用,不可用于线上产品环境. URI请求会被发送到PHP所在的的工作目 ...
- [iOS Animation]-CALayer 显示方式
寄宿图 图片胜过千言万语,界面抵得上千图片 ——Ben Shneiderman 我们在第一章『图层树』中介绍了CALayer类并创建了一个简单的有蓝色背景的图层.背景颜色还好啦,但是如果它仅仅是展现了 ...
- LWIP_STM32_ENC28J60_NETCONN_TCP_CLIENT(4)
既然udp说完了,那接下来自然就是TCP通讯了,今天说说TCP客户端通讯,也就是单片机作为客户端,主机PC作为服务器 相比于udp而言,tcp增加了一个连接服务器的流程,首先还是创建tcp_clien ...