【问题标题】:Arrow with incomplete border不完整边框的箭头
【发布时间】:2016-04-28 17:29:45
【问题描述】:

如何在白色 div 的左侧制作这个箭头。 这是我尝试过的 css,但它只制作了一种颜色边框。

.white-box{
        padding: 20px;
    background: #fff;
  }
  .white-box:after,white-box:before{
    right: 100%;
    top: 50%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
  }
  .white-box:after {
    border-color: rgba(136, 183, 213, 0);
    border-right-color: #88b7d5;
    border-width: 30px;
    margin-top: -30px;
}
.white-box:before {
    border-color: rgba(194, 225, 245, 0);
    border-right-color: #c2e1f5;
    border-width: 36px;
    margin-top: -36px;
}

【问题讨论】:

  • 您至少需要尝试自己编写代码,如果遇到困难,请在此处发布代码。这不是代码编写服务。
  • 我自己编码很累
  • 然后向我们展示您的代码。

标签: html css svg css-shapes


【解决方案1】:

使用inline svgpath element 非常简单:

svg{
  width:30%; height:auto;
  display:block;
}
<svg viewbox="1 0 5 10">
  <path d="M5 3 V1 L2 5 L5 9 V7" stroke="grey" stroke-width="0.5" fill="#fff"/>
</svg>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-04-08
    • 2014-06-19
    • 1970-01-01
    • 2013-02-17
    • 2017-07-22
    • 2019-01-16
    • 1970-01-01
    相关资源
    最近更新 更多