-1
我得到了一个有2行文字的圆圈。 第一个说:P 第二个说:出版物。如何减少两行文字之间的空间
它们之间的空间现在太大了。有没有办法让空间变小?
.circle1 {
font-family: Arial;
text-align: center;
background: #73B7DB;
border-radius: 100px;
width: 110px;
height: 105px;
padding-top:5px;
color: #fff;
margin: 0 auto;
}
.Capital {
margin: 0px 0 0px 0;
line-height:70px;
font-size: 60px;
font-weight:ligter;
}
.text {
text-align: center;
margin-top: 0px !important;
font-weight: 100;
font-size: 15px;
}
<div class="circle1">
<h2 class="Capital">P</h2>
<span class="text">Publications</span>
</div>
我更喜欢这种方法,而不是使用负边距(这可能会导致其他副作用,例如元素空间没有被覆盖,因为所述元素由负边缘“向上”)。使用负边距意味着其他地方可能会出现一些CSS错误。 – KarelG