css tab样式中背景图片对不齐

html-css016

css tab样式中背景图片对不齐,第1张

*{margin:0px autopadding:0px}加进样式里面试试

background:url(../images/but2.png)background-position:top right这种你可以这样写background:url(../images/but2.png) right no-repeat更好如果要行居中的话直接在no-repeat后面加个0px 不用去指明父框坐标原点

Tab菜单比较简单的方法是直接使用dreamweaver cs3的spry制作,其他方法制作难度比较大,不管哪种方法,必须要使用javascript调用。

<ul class="tabs">

<li>

<input type="radio" name="tabs" id="tab1" checked />

<label for="tab1">选项卡 1</label>

<div id="tab-content1" class="tab-content">

<p>选项卡内容 1</p>

</div>

</li>

<li>

<input type="radio" name="tabs" id="tab2" />

<label for="tab2">选项卡 2</label>

<div id="tab-content2" class="tab-content">

<p>选项卡内容 2</p>

</div>

</li>

</ul>