SVG 100%宽度高圆帽

时间:2018-02-13 11:07:24

标签: svg

我想要我的SVG,即100%宽度和高度,带圆帽。 现在他们有点紧张。



html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background-color: cadetblue
}

.st0 {
  fill: none;
  stroke: green;
  stroke-width: 20px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-miterlimit: 10;
}

<svg height="100%" width="100%" viewBox="0 0 100 100" preserveAspectRatio="none">
       <path d="M15 15 L85 15 L85 85 L15 85 L15 50 L50 50 " class="st0"/>
        </svg>
&#13;
&#13;
&#13;

感谢您帮助我!

1 个答案:

答案 0 :(得分:0)

好的,自己找到了: 刚刚添加

vector-effect="non-scaling-stroke"

进入SVG

相关问题