我的“秋装”边框右侧不见了,我想知道如何才能恢复它?
h3.outfitsbuttonsheadings {
text-align: center;
font-family:'Mali', cursive;
}
span.outfitsbuttonsheadings {
text-align: center;
padding-left: 4px;
padding-right: 4px;
border: 2px solid black;
}
span.date {
text-align: center;
font-family: "Times New Roman";
font-weight: normal;
}
<h3 class="outfitsbuttonsheadings">
<span class="outfitsbuttonsheadings">Autumn outfits<br></span><span class="date">23 September, 2018</span>
</h3>
最佳答案
由于您的无效标记,边框消失了;你不能有 <br />
<span>
的内部标签标记,作为 <span>
标签 only allows for措辞内容。
只需移动 <br />
标记到 <span>
的之后标记将恢复边框:
h3.outfitsbuttonsheadings {
text-align: center;
font-family: 'Mali', cursive;
}
span.outfitsbuttonsheadings {
text-align: center;
padding-left: 4px;
padding-right: 4px;
border: 2px solid black;
}
span.date {
text-align: center;
font-family: "Times New Roman";
font-weight: normal;
}
<h3 class="outfitsbuttonsheadings">
<span class="outfitsbuttonsheadings">Autumn outfits</span>
<br>
<span class="date">23 September, 2018</span>
</h3>
关于html - 我怎样才能恢复边界的右侧?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53074623/