<!DOCTYPE html>
<style>
div {
border:1px solid red;
width:200px;
height:100px;
text-align:center;
font-size:0px;
}
div:before{
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
}
span {
vertical-align:middle;
display:inline-block;
font-size:1rem;
}
#box {
width:100px;
height:98px;
background:#EEE;
}
</style>
<div>
<span>abc</span><span>def</span>
</div>