首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

【HTML】怎么在文本框中插入图片

2012-09-17 
【HTML】如何在文本框中插入图片【HTML】如何在文本框中插入图片请高手指教。[解决办法]input typetext cla

【HTML】如何在文本框中插入图片
【HTML】如何在文本框中插入图片

请高手指教。

[解决办法]
<input type="text" class="search" maxlength="180" value="" style="border: 1px solid rgb(165, 165, 167); width: 180px; height: 22px; background-image: url(http://images.51job.com/im/my_history/key_search.gif); background-repeat: no-repeat; line-height: 21px; padding-left: 24px;" id="keyword" name="keyword" autocomplete="off" key="iCom1" vindex="-1" preval="fdd"/>
用的不重复背景图,再用padding-left把文字顶开。
[解决办法]
[code=HTML
<html> 
<body> 
<table align="left" border="0" cellpadding="0" cellspacing="0" width="295">
 <tr>
<td align="left" valign="top"><input preval="" vindex="-1" key="iCom1" autocomplete="off" name="keyword" id="keyword" style="border: 1px solid rgb(165, 165, 167); width: 180px; height: 22px; background-image: url(http://images.51job.com/im/my_history/key_search.gif); background-repeat: no-repeat; line-height: 21px; padding-left: 24px;" value="" maxlength="180" class="search" type="text">
</td>
</tr>
</table>
</body>
</html>
][/code]
把图片换成你自己的就可以了。

热点排行