【问题标题】:How to use css or sass to make slanted background color [duplicate]如何使用css或sass制作倾斜的背景颜色[重复]
【发布时间】:2020-03-25 02:28:41
【问题描述】:

如何使用 css 或 sass 使其像 Button A & B

按钮 A 按钮 B

【问题讨论】:

  • 发布的问题似乎根本不包括任何解决问题的尝试。 Stack Overflow 期待您 try to solve your own problem first,因为您的尝试有助于我们更好地了解您想要什么。请编辑问题以显示您尝试过的内容,以说明您在minimal reproducible example 中遇到的特定障碍。

标签: html css sass


【解决方案1】:

您需要为此使用剪辑路径。如果您正在寻找入门的地方,请尝试

<style>
.shapePoly {
clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 0%);
background-color: orange;
width: 100px;
height: 50px;
}
</style>

【讨论】:

    猜你喜欢
    • 2018-06-05
    • 1970-01-01
    • 1970-01-01
    • 2016-07-10
    • 1970-01-01
    • 1970-01-01
    • 2021-01-01
    • 1970-01-01
    • 2014-03-15
    相关资源
    最近更新 更多