d3js svg基础

        <svg width="8000" height="9000" version = "1.1">
                <!-- 矩形 -->	
                <rect x="20" y = "20" width="200" height="100" style="fill:red;stroke:blue;stroke-width:4;opacity:0.5"/>
                <rect x="300" y = "20" width="200" height="100" rx="20" ry="30" style="fill:red;stroke:blue;stroke-width:4;opacity:0.5"/>
                    <!-- 圆形 -->	
                <circle cx="150" cy="250"  r="80" style="fill:yellow;stroke:black;stroke-width:4" />
                        <!-- 椭圆-->	
                <ellipse cx="350" cy="250" rx="110" ry="80" style="fill:#33FF33;stroke:blue;stroke-width:4" />
                    <!-- 直线 线段 -->
                 <line x1="20" y1="300" x2="300" y2="400" style="stroke:black;stroke-width:4;" />
                    <!-- 多边形 折线 -->	
                <polygon points="100,20 20,90 60,160 140,160 180,90"
                    style="file:LawnGreen;stroke:black;stroke-width:3"/>

                    <!--  折线 -->	
                <!-- <polyline points="100,20+100 20,90+100 60,160+100 140,160+100 180,90+100"
                    style="file:white;stroke:black;stroke-width:3" transform="translate(200,0)"/> -->

                    <!-- 路径 -->	
                    <path d="M30,100 L270,300 M30,100 H270 M30,100 v300"
                        style="stroke:black;stroke-width:3" />
                    <!-- 圆形 -->	
                    <!-- 圆形 -->		
            </svg>
    <p>Hello World 1</p>
    <p id="myid">Hello World 2</p>
    <script src="js/d3.v4.js" charset="utf-8"></script> 
    <script>  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值