Update
The following solution works, but only for a fixed background-size
. See @Temani Afif's answer for a better solution.
Answer
You can use the background-position
CSS property to do exactly what you were thinking.
body {
background: white;
background-image: radial-gradient(black 1px, transparent 0);
background-size: 40px 40px;
background-position: -19px -19px;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…