大佬教程收集整理的这篇文章主要介绍了html5 – 如何设置stroke-width:1只在SVG形状的某些边?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
rect { fill: none; stroke: black; } .top { stroke-dasharray: 0,50,150 } .left { stroke-dasharray: 150,50 } .bottom { stroke-dasharray: 100,50 } .right { stroke-dasharray: 50,100 }
<svg height="300"> <rect x="0.5" y="0.5" width="50" height="50" class="top"/> <rect x="0.5" y="60.5" width="50" height="50" class="left"/> <rect x="0.5" y="120.5" width="50" height="50" class="bottom"/> <rect x="0.5" y="180.5" width="50" height="50" class="right"/> </svg>
见jsfiddle。
以上是大佬教程为你收集整理的html5 – 如何设置stroke-width:1只在SVG形状的某些边?全部内容,希望文章能够帮你解决html5 – 如何设置stroke-width:1只在SVG形状的某些边?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。