<div>
<div class="key">key</div>
<div></div>
<div></div>
<div class="lock">lock</div>
</div>
<div>
<div></div>
<div></div>
<div></div>
<div class="lock">lock</div>
</div>
*{
box-sizing: border-box;
}
html{
width: 100%;
height: 100%;
}
body{
font-family: sans;
margin: 0px!important;
border: none;
padding: 0px;
background-color: seagreen;
display:flex;
flex-wrap: wrap;
position: relative;
justify-content: space-around;
align-items: center;
width: 100%;
height: 100%;
}
div{
min-width: 100px;
min-height: 50px;
padding: 10px;
border: 1px solid currentColor;
}
/* ============= */
.key~.lock{
color: red;
}
This Pen doesn't use any external CSS resources.