Diagonal Side div color css js

后端 未结 3 1711
刺人心
刺人心 2021-01-25 13:06

i have 2 div like this

3条回答
  •  不要未来只要你来
    2021-01-25 13:30

    Try using an svg path css background property. See example below.

    .container {
      background: red;
      height: 117px;
    }
    
    .one {
      float: left;
      width: 50%;
      height: 117px;
      background: url("data:image/svg+xml;utf8,") no-repeat;
    }
    .two {
      float: left;
      width: 50%;
      height: 117px;
    }

提交回复
热议问题