I want make a Square spaced dotted border, Can anyone please tell how to make those dots **Square**, Like,

[![enter image description here](https://i.stack.imgur.com/vcdr9.jpg)](https://i.stack.imgur.com/vcdr9.jpg)

Here is my code, Please help me.

```css
.dots{
  background-image: linear-gradient(to bottom, #333 10%, rgba(255, 255, 255, 0) 0%);
  background-position: left;
  background-size: 1px 10px;
  background-repeat: repeat-y;
}
div {
  padding: 10px 50px;
  width: 100px;
  height: 200px; 
}
```

```html
<div class="dots">Dotted border</div>
```