中国优质的IT技术网站
专业IT技术创作平台
IT职业在线教育平台
一、说明 绘制线条。
说明:该组件从API version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
二、子组件 支持animate、animateMotion、animateTransform。
三、属性 支持Svg组件通用属性和以下属性。
四、案例
<div class="container"> <svg width="400" height="400"> <line x1="10" x2="300" y1="50" y2="50" stroke-width="4" fill="white" stroke="blue"></line> <line x1="10" x2="300" y1="100" y2="100" stroke-width="4" fill="white" stroke="blue"></line> <line x1="10" x2="300" y1="150" y2="150" stroke-width="10" stroke="red" stroke-dasharray="5 3" stroke-dashoffset="3"></line> <line x1="10" x2="300" y1="200" y2="200" stroke-width="10" stroke="black" stroke-linecap="round"></line> <line x1="10" x2="300" y1="220" y2="220" stroke-width="10" stroke="black" stroke-linecap="butt"></line> <line x1="10" x2="300" y1="240" y2="240" stroke-width="10" stroke="black" stroke-linecap="square"></line> </svg> </div>
效果:
完整代码地址为: https://gitee.com/jltfcloudcn/jump_to/tree/master/line
微信扫码分享