Edit in JSFiddle

<div></div>
body {
    width: 100vw;
    height: 100vh;
    display: flex;
}

div {
    width: 20vw;
    height: 20vw;
    margin: auto;
    background-color: rgba(0, 0, 0, .1);
    background-image: linear-gradient(black 5vw, transparent 5vw, transparent 15vw, black 15vw), linear-gradient(90deg, black 5vw, transparent 5vw, transparent 15vw, black 15vw), linear-gradient(black 5vw, transparent 5vw, transparent 15vw, black 15vw), linear-gradient(90deg, black 5vw, transparent 5vw, transparent 15vw, black 15vw);
    background-size: 5px 20vw, 20vw 5px, 5px 20vw, 20vw 5px;
    background-position: 0 0, 0 0, 100% 100%, 100% 100%;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
}