【问题标题】:CSS special shape with one shaved corner [duplicate]带有一个剃光角的CSS特殊形状[重复]
【发布时间】:2020-04-23 19:21:15
【问题描述】:

我尝试制作一个剃掉一个角的按钮,我在网上搜索但找不到这样的方法。

我尝试的是以下css代码:

   #button {
  border-bottom: 100px solid red;
  border-left: 25px solid transparent;
  height: 0;
  width: 100px;
}

但正如你所看到的,它确实......:

任何帮助都会很棒

【问题讨论】:

标签: css shapes


【解决方案1】:

您是否考虑过使用剪辑路径? You can try this

.path {
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%, 0 29%);
  width: 100px;
  height: 60px;
  background-color: tomato;
}
<div class="path"></div>

【讨论】:

  • 抱歉回答晚了,但这对我来说是解决办法!
猜你喜欢
  • 2015-07-20
  • 2015-06-29
  • 2019-06-15
  • 1970-01-01
  • 2013-10-07
  • 2014-02-21
  • 1970-01-01
  • 2013-07-16
  • 2017-04-21
相关资源
最近更新 更多