【发布时间】:2010-11-19 18:01:50
【问题描述】:
我试图让我的 HTML 非常简单。我有一个集合列表,其中声明了一个向导的名称,例如一组步骤...
<div>
<ul class="wizardBar">
<li class="step1">Step One</div>
<li class="step2">Step Two</div>
<li class="step3">Step Three</div>
</ul>
</div>
我的 CSS 文件中有以下内容来格式化它...
.wizardbar
{
display:table;
padding:0;
margin:0;
white-space:wrap;
list-style-type:none;
}
* html .wizardbar {
display:inline-block;
width:1px;
padding:0 2px;
}
.wizardbar li
{
display:table-cell;
width: 116px;
text-align: center;
padding-top: 36px;
}
.step1
{
background: url('Step1.gif') no-repeat;
}
.step2
{
background: url('Step2.gif') no-repeat;
}
.step3
{
background: url('Step3.gif') no-repeat;
}
我在这里想要完成的是......
Step1.gif.....Step2.gif.....Step3.gif
.第 1 步........第 2 步........第 3 步
步骤名称(即:“STEP 1”)显示在该步骤的图像下方。当前,文本位于图像之上。我不希望有任何重叠。
谢谢, 贾斯汀
【问题讨论】:
标签: html css background-image