CSS下切/切边

CSS下切/切边,css,reactjs,styles,Css,Reactjs,Styles,我想这样吵架 到目前为止我尝试的代码, JSX-> 它显示-> 它不像第一幅图像那样切割边缘。我怎样才能做到这一点。 TIA。使用剪辑路径实现这种效果: main{ 对齐项目:居中; 背景:黑色; 显示器:flex; 高度:100vh; 证明内容:中心; 宽度:100v; } div{ 背景:白色; 剪辑路径:多边形(0.25%,100%0%,100%100%,0%100%); 身高:75%; 宽度:75%; } 您也可以使用“剪辑路径”,但“剪辑路径”有时在某些浏览器中不起作用。您可

我想这样吵架

到目前为止我尝试的代码, JSX->

它显示->

它不像第一幅图像那样切割边缘。我怎样才能做到这一点。
TIA。

使用
剪辑路径
实现这种效果:


main{
对齐项目:居中;
背景:黑色;
显示器:flex;
高度:100vh;
证明内容:中心;
宽度:100v;
}
div{
背景:白色;
剪辑路径:多边形(0.25%,100%0%,100%100%,0%100%);
身高:75%;
宽度:75%;
}

您也可以使用“剪辑路径”,但“剪辑路径”有时在某些浏览器中不起作用。您可以使用“背景线性”属性来获取边缘的剪切。 使用以下命令:

.other {
    margin: 5vw 15vw;
    position: relative;
  }
  
  .edgeCut {
    padding: 1.5em 2em;
    background: linear-gradient(135deg,transparent 18px,#b9ffee  0)top left,linear-gradient(45deg,transparent 18px,#b9ffee  0)bottom  left,linear-gradient(-135deg,transparent 18px,#b9ffee  0)top right,linear-gradient(-45deg,transparent 18px,#b9ffee  0)bottom right;
    background-size: 50% 50%;
    background-repeat: no-repeat;
    width: 100%;
    transform: rotate(-0.38deg);
    position: absolute;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .blueText{
      color: #5C9FCF;
  }
  
  .bottomImage{
      height: 1em;
      width: 2em;
      margin-left: 0.5em;
      cursor: pointer;
  }
它将显示 如果你想换衣服 您只需更改背景大小即可 如果你要做背景尺寸:70%30%

您将获得以下信息:


如果你想在循环中使用不同的属性,你也可以得到循环边。

你得到答案了吗?或者你想要其他东西吗?96%的浏览者支持剪辑路径。。。使用剪辑路径,获得所需的输出。你也试过了,这是个有趣的选择。。将需要尝试更多以更好地理解
.other {
  margin: 5vw 15vw;
  position: relative;
}

.edgeCut {
  padding: 1.5em 2em;
  background: linear-gradient(273.05deg, #b9ffee 11.12%, #c2f8ff 73.8%);
  width: 100%;
  border-radius: 36px;
  transform: rotate(-0.38deg);
  position: absolute;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.blueText{
    color: #5C9FCF;
}

.bottomImage{
    height: 1em;
    width: 2em;
    margin-left: 0.5em;
    cursor: pointer;
}
.other {
    margin: 5vw 15vw;
    position: relative;
  }
  
  .edgeCut {
    padding: 1.5em 2em;
    background: linear-gradient(135deg,transparent 18px,#b9ffee  0)top left,linear-gradient(45deg,transparent 18px,#b9ffee  0)bottom  left,linear-gradient(-135deg,transparent 18px,#b9ffee  0)top right,linear-gradient(-45deg,transparent 18px,#b9ffee  0)bottom right;
    background-size: 50% 50%;
    background-repeat: no-repeat;
    width: 100%;
    transform: rotate(-0.38deg);
    position: absolute;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .blueText{
      color: #5C9FCF;
  }
  
  .bottomImage{
      height: 1em;
      width: 2em;
      margin-left: 0.5em;
      cursor: pointer;
  }