我正在制作我的关于页面,并且在这方面遇到了麻烦。试图将“年份或待定”对齐到列的右侧。请参见以下示例图片。
上面是当前的外观。底部图像是我想要的外观。
我正在制作我的关于页面,并且在这方面遇到了麻烦。试图将“年份或待定”对齐到列的右侧。请参见以下示例图片。
上面是当前的外观。底部图像是我想要的外观。
尝试使用 span,然后将样式设置为 'float:right'
<span style="float:right">pending </span>
CSS
ul {
list-style: none;
}
#about ul li span {
float: right;
}
html
<div id="about">
<h3><strong>Education</strong></h3>
<ul>
<li><strong>Golden West College – Huntington Beach, CA <span>2012-2014</span></strong>
</li>
<li>– Associate in Arts Degree – Digital Arts Major <span>(pending)</span>
</li><br/>
<li>Certificate of Achievement</li>
<li>– Graphic Design and Production Option <span>(pending)</span>
</li><br/>
<li>Certificate of Specialization</li>
<li>– Graphic Design Foundation <span>6/2014</span>
</li>
<li>– Graphic Design Advanced Production <span>(pending)</span>
</li>
</ul>
</div>
给你
<ul>
<strong>Golden West College – Huntington Beach, CA <span style="float:right">2012-2014</span></strong><br>
– Associate in Arts Degree – Digital Arts Major <span style="float:right">(pending)</span><br>
<br> Certificate of Achievement<br>
– Graphic Design and Production Option <span style="float:right">(pending)</span><br>
<br> Certificate of Specialization<br>
– Graphic Design Foundation <span style="float:right">6/2014</span><br>
– Graphic Design Advanced Production <span style="float:right">(pending)</span><br>
</ul>
style
属性,而是使用.class
。 - hitautodestruct