当我尝试用 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 创建第一个字段(firstName)
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 按类型设置样式或命名表单元素。
input[type=text] {
//styling
}
input[name=html_name] {
//styling
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)