斜邊樣式

ThisCall發表於2024-08-22

.trapezium {
  display: inline-block;
  min-width: 200px;
  height: 0;
  border-width: 0px 20px 40px 0px;
  border-style: none solid solid;
  border-color: transparent transparent #f1f3f7;
  // box-shadow: 0px 1px 5px 0px #ccc;
}
.parallel {
  display: inline-block;
  min-width: 200px;
  height: 40px;
  background: #f1f3f7;
  transform: skew(25deg, 0) translateX(-10px);
  font-family: normal;
  box-shadow: 0px 1px 5px 0px #ccc;
  padding-right: 15px;
  span {
    // padding-left: 10px;
    display: inline-block;
    transform: skew(-25deg, 0);
  }
}

相關文章