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 ... 
随机推荐
- CastelWindsor Demo
			class Program { static void Main(string[] args) { var container = new WindsorContainer(); container. ... 
- webapp之路--百度手机前端经验(转)
			看了之后收获很大,分享一下: 本文将围绕我半年来在移动前端工程化做的一些工作做的总结,主要从localstorage缓存和版本号管理,模块化,静态资源渲染方式三个方面总结手机百度前端一年内沉淀的解决方 ... 
- sqlite manager
			http://www.isummation.com/blog/how-to-use-sqlite-manager-extension-in-firefox/ 工具条上右键选定制 
- 【BZOJ 1572】 1572: [Usaco2009 Open]工作安排Job(贪心+优先队列)
			1572: [Usaco2009 Open]工作安排Job Description Farmer John 有太多的工作要做啊!!!!!!!!为了让农场高效运转,他必须靠他的工作赚钱,每项工作花一个单 ... 
- phpcms 细节
			Phpcms V9采用if语句判断当前栏目高亮.判断分类信息是否过期 10月05, 2013 by SJY 在用PC V9建站的时候,很多朋友会想到Phpcms V9判定当前栏目,让当前栏目高亮的功能 ... 
- 整理JRE瘦身或精简JRE
			http://blog.csdn.net/xiaoping8411/article/details/6973887 版权声明:本文为博主原创文章,未经博主允许不得转载. 前不久给朋友做了一个桌面程序, ... 
- 使用RGBa和Filter实现不影响子元素的CSS透明背景
			点击查看原文 问题 如果我们想要一个元素拥有半透明的背景,我们有两个选择: 使用CSS和 opacity 做一张 24-bit PNG 背景图片 在CSS中使用opacity有两个问题,一是为了适应所 ... 
- 控制流之break
			break语句是用来 终止 循环语句的,即哪怕循环条件没有称为False或序列还没有被完全递归,也停止执行循环语句.一个重要的注释是,如果你从for或while循环中 终止 ,任何对应的循环else块 ... 
- LVS+Keppalived实现高可用负载均衡
			三.LVS Keppalived的安装 3.1.环境描述 LVS server1 (Master):10.0.0.202 虚拟IP为:10.0.0.210 LVS server2 ( Slave ) ... 
- (简单)  POJ  2251  Dungeon Master,BFS。
			Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is co ... 
