css实现透明网格背景

.transparent{
  background-color: #fff;
  background-image: linear-gradient(
      45deg,
      #ccc 25%,
      transparent 25%,
      transparent 75%,
      #ccc 75%,
      #ccc
    ),
    linear-gradient(
      45deg,
      #ccc 25%,
      transparent 25%,
      transparent 75%,
      #ccc 75%,
      #ccc
    );
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
}

你可能感兴趣的:(css实现透明网格背景)