Creating a Tab shape with CSS or SVG

后端 未结 5 1176
逝去的感伤
逝去的感伤 2020-12-12 07:13

Does anyone have an idea how to make this tab like shape :

\"enter

5条回答
  •  离开以前
    2020-12-12 07:48

    Here is figure:

    Setting the border of an after element so that it cancels out the top part of the shape :)

    .box {
      position: relative;
      background-color: tomato;
      width: 300px;
      height: 200px;
    }
    .box:before {
      content:"";
      position: absolute;
      right: 0;
      width: 100px;
      border-bottom: 15px solid transparent;
      border-left: 15px solid transparent;
      border-top: 15px solid white;
    }
    .box span {
      
    }

    Here you get a nice folder like figure :D

提交回复
热议问题