在我的测试中,我将两个跨度都设置为display:inline-block with a border for visibility。Firefox在每个跨度之间呈现空间。即使设置边距:0;填充:0;也不能解决这个问题。在将内联span元素设置为display: inline -block时,我的期望是两个跨度彼此齐平,就像您向左或向右浮动两个div一样。我找到的唯一的“修复”方法是在跨度中添加float:left或right,但这违背了我尝试完全不使用float的初衷。有什么想法吗?
<style>
span{
border:2px solid #000;
dis
在其中有一节中,我将text-align定义为行的left,但由于某种原因它没有生效。
<section id="topic1">
This is a centered Heading for Topic 1<br>
<span class="text">This is a left aligned line</span>
</section>
section {
text-align: center;
height: auto;
width: 100%;
}
.text {
disp