【问题标题】:How to create arrow shape header using css? [duplicate]如何使用 css 创建箭头形状标题? [复制]
【发布时间】:2019-10-06 16:26:47
【问题描述】:

我正在尝试创建一个弯曲的标题

使用 css,但不知道如何正确处理。 如果你以前见过这个,你能指出我正确的方向吗?我在玩 SVG 效果,但也许有更好的方法来做到这一点。

【问题讨论】:

    标签: html css


    【解决方案1】:

    您可以使用css clip-path 来获得这样的形状。

    .parent {
      width: 100%;
      height: 200px;
      background: red;
    }
    
    .child {
      clip-path: polygon(100% 0, 100% 30%, 50% 50%, 0 30%, 0 0);
      background: #000;
      width: 100%;
      height: 100%;
    }
    <div class="parent">
      <div class="child"></div>
    </div>

    【讨论】:

      猜你喜欢
      • 2015-02-16
      • 2016-06-18
      • 1970-01-01
      • 2013-08-29
      • 1970-01-01
      • 1970-01-01
      • 2014-07-31
      • 1970-01-01
      相关资源
      最近更新 更多