首页 / JAVASCRIPT / [javascript svg fill stroke stroke-width points polyline 属性讲解] svg fill stroke stroke-width points polyline 绘制折线属性讲解
[javascript svg fill stroke stroke-width points polyline 属性讲解] svg fill stroke stroke-width points polyline 绘制折线属性讲解
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了[javascript svg fill stroke stroke-width points polyline 属性讲解] svg fill stroke stroke-width points polyline 绘制折线属性讲解,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1741字,纯文字阅读大概需要3分钟。
内容图文
1 <!DOCTYPE html>
2 <html lang=‘zh-cn‘>
3 <head>
4 <title>Insert you title</title>
5 <meta name=‘description‘ content=‘this is my page‘>
6 <meta name=‘keywords‘ content=‘keyword1,keyword2,keyword3‘>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8 <link rel=‘stylesheet‘ type=‘text/css‘ href=‘./css/index.css‘ />
9 <script type=‘text/javascript‘ src=‘./js/jquery-1.12.1.min.js‘></script>
10 <style type=‘text/css‘>
11html,body,div,svg {
12 margin: 0; padding: 0;
13}
1415#wrap {
16 width: 500px; height: 450px; border: 1px solid #999; border-radius: 2px; margin: 25px auto;
17}
1819svg {
20 height: 100%; width: 100%;
21/* 在谷歌浏览器中如果不指定svg的大小,那么使用默认的300*150大小(将焦点放置在调控台{Element}中的标签上可以检查),但是在火狐中表现却不同
22 即使我们不指定svg的大小,指定父元素的大小,那么svg的大小将继承父元素;
23*/24}
25 </style>
26 <script type=‘text/javascript‘>
27 $( function(){
2829 } );
30 </script>
31 </head>
32 <body>
33 <div id=‘wrap‘>
34 <svg xmlns=‘http://www.w3.org/2000/svg‘ version=‘1.1‘>
35 <polyline points = ‘20 25 ,70 65 ,150 300, 15 400‘ fill=‘ transparent ‘ stroke=‘#C7F309‘
36 stroke-width=‘3‘ stroke-opacity = ‘.3‘ fill-opacity = ‘.9‘
37 ></polyline> <!-- 参数解析 points 点的坐标 每两个算是一组 组与组之间可以使用逗号做间隔,也可以不使用 直接与空格相隔开 默认有填充 如果想设置为透明(none/transparent)虽然none与transparent效果相同但是机理完全不同none是没有填充 transparent
38 是透明, 勾勒描边为无 style = "fill:#09F3C7 ;stroke:#C7F309;" stroke-opacity = ‘.3‘ fill-opacity = ‘.9‘-->
39 </svg>
40 </div>
41 </body>
42 </html>
原文:http://www.cnblogs.com/mysearchblog/p/5964225.html
内容总结
以上是互联网集市为您收集整理的[javascript svg fill stroke stroke-width points polyline 属性讲解] svg fill stroke stroke-width points polyline 绘制折线属性讲解全部内容,希望文章能够帮你解决[javascript svg fill stroke stroke-width points polyline 属性讲解] svg fill stroke stroke-width points polyline 绘制折线属性讲解所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。