我正在<input type="text">
使用
background: #e3e3e6 url(search.jpg) no-repeat 7px 2px;
在左侧。
我想在文本框的另一侧添加其他图像。(右边)。最好的方法是什么?
html(使用class属性分隔带有和不带有背景的元素)
<input type="text" />
样本CSS:
input[type="text"] {
background: url(http://www.placehold.it/20x20&text=left), url(http://www.placehold.it/20x20&text=right);
background-repeat: no-repeat, no-repeat;
background-position: center left, center right;
}
这是一个演示:http : //jsfiddle.net/oLd7zdf7/
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句