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/