我有一个使用的背景图像这200通过使用以下css类重复图像背景
.searchBar{
border-style: hidden;
border-width: 0px;
color: #FFFFFF;
padding-left: 10px;
padding-right: 10px;
font-size:1em;
background-image: url(images/searchBox2.gif);
font-family: "calibri", "helvetica", sans-serif;
margin-left:1%;
width: 200px;
height: 25px;
outline: 0 none;
vertical-align: middle;
}
出于某种原因,25像素搜索栏,它延伸通过所述元件的220 27字段(左侧和右侧的10个填充以及另一个类的顶部和底部的另一个1个填充)并且重复背景图像。它以我想要的方式工作,直到我最近在我的代码中添加了doctype html 4.01 transitional为止。下面是我的意思的视觉链接: Picture of Search Bar before and after
的背景和图像中添加不重复。 – sandeep 2011-03-16 10:31:49