one-border.css 1.3 KB
.border-1px {
  position: relative;
}
.border-1px:before,
.border-1px:after {
  border-top: 1px solid #e2e2e2;
  content: '';
  display: block;
  width: 100%;
  position: absolute;
  left: 0;
  z-index: 1;
}
.border-1px:before {
  top: 0;
}
.border-1px:after {
  bottom: 0;
}
.border-1px.border-top:after {
  display: none;
}
.border-1px.border-bottom:before {
  display: none;
}
.border-1px-full {
  position: relative;
}
.border-1px-full:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  border: 1px solid #e2e2e2;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 200%;
  height: 200%;
  -webkit-transform: scale(0.5);
  transform: scale(0.5);
  -webkit-transform-origin: left top;
  transform-origin: left top;
  border-radius: 3px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
}
@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5) {
  .border-1px::after,
  .border-1px::before {
    -webkit-transform: scaleY(0.7);
    -webkit-transform-origin: 0 0;
    transform: scaleY(0.7);
  }
  .border-1px::after {
    -webkit-transform-origin: left bottom;
  }
}
@media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
  .border-1px::after,
  .border-1px::before {
    -webkit-transform: scaleY(0.5);
    transform: scaleY(0.5);
  }
}