0
가능한 중복 :
Horizontally and vertically center a pre tag without the use of tables?상대 텍스트 센터링. 수직 및 수평
어떻게해야합니까 수평 및 수직 중심 텍스트 폭을 지정하지 않고?
지금 내가 가진 :<div class="center">
<p id="logo"><span>Coming soon!</span></p>
</div>
과 CSS는 다음과 같습니다 텍스트가 서로 다른 폭을 것
span {
color:#ff0000;
font-size: 14px;
font-weight:normal;
font-family:sans-serif;
border-bottom-color: currentColor;
border-bottom-style: dotted;
border-bottom-width: 1px;
line-height: 1.1;
}
.center {
width:150px;
height:100px;
position:absolute;
left:50%;
top:50%;
margin-left:-100px;
margin-top:-50px;
}
때문에, 나는 또 다른 솔루션이 필요합니다.