常用的css

107 阅读1分钟

首子元素不用该样式

.van-card:not(:first-child) { margin-top: 1px; }

实心三角形

.arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
  }
  .up {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid #333;
    font-size: 0;
    line-height: 0;
  }
  .down {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #333;
    font-size: 0;
    line-height: 0;
  }

1px border


.tip-box {
    background-color: #fff;
    font-size: 11px;
    font-weight: 400;
    color: #999999;
    line-height: 50px;
    position: relative;
    &::after {
      position: absolute;
      box-sizing: border-box;
      content: " ";
      pointer-events: none;
      right: 16px;
      bottom: 0;
      left: 16px;
      border-bottom: 1px solid #ebedf0;
      -webkit-transform: scaleY(0.5);
      transform: scaleY(0.5);
    }
  }