當我嘗試添加一些輸入字段與CSS如何添加CSS爲特定輸入類型的文本
我有一個問題
我不能讓一個以上的CSS的一些輸入字段
這是場我
<input type="text" name="firstName" />
<input type="text" name="lastName" />
和CSS是
input
{
background-image:url('images/fieldBG.gif');
background-repeat:repeat-x;
border: 0px solid;
height:25px;
width:235px;
}
我要打的第一個字段(名字),這個CSS
input
{
background-image:url('images/fieldBG.gif');
background-repeat:repeat-x;
border: 0px solid;
height:25px;
width:235px;
}
,第二個(lastName的)這個CSS
input
{
background-image:url('images/fieldBG2222.gif');
background-repeat:repeat-x;
border: 0px solid;
height:25px;
width:125px;
}
幫助請:-)
[CSS選擇器(http://www.w3.org/TR/CSS2/selector.html)的[什麼HTML/CSS,你會用它來創建與背景的文本輸入 – Musa
可能重複? ](http://stackoverflow.com/questions/526548/what-html-css-would-you-use-to-create-a-text-input-with-a-background) – ghoppe
@Musa - 這是一個有點更容易閱讀。 HTTP://net.tutsplus。com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/ –