CSS 实现左滑删除

    .list::-webkit-scrollbar {
      display: none;
    }

    .list {
      display: flex;
      overflow-y: hidden;
      scroll-snap-type:x mandatory;
    }

    .content {
      flex: 0 0 100vw;
      background-color: #fff;
      position: relative;
      scroll-snap-align: start;
    }

    .space {
      flex: 0 0 4rem;
      scroll-snap-align: end;
    }

    .button {
      text-align: center;
      background-color: aquamarine;
      color: #fff;
      width: 4rem;
      position: absolute;
      right: 0;
    }

  

删除

我是列表,试试左滑我

你可能感兴趣的:(CSS 实现左滑删除)