`

文本域(Textarea)背景的美化

    博客分类:
  • CSS
CSS 
阅读更多

经常浏览网站进出论坛,新闻评论的朋友大都看到过这个漂亮的美化的文本域(Textarea)背景。短短几行代码表达的效果却非常的大,让访客不自觉地就能加深对网站的视觉印象,从而更好地做到宣传的目的,也同时美化了单调的文本域(Textarea)背景。
文本域背景美化(添加文本域背景图片)展示效果代码如下:<style type=”text/css”>
<!–
.textfield {width:450px;height:20px;background-image:url(images/inputbg.gif);color:#666;border:1px dotted #999666;padding:3px 0px 0px 5px;} /*设置标题文本框边框,背景图片及文字颜色*/
.textarea {width:450px;height:120px;background:url(images/logo.gif) no-repeat right top;border:1px dotted #999666; } /*设置留言文本框边框,背景图片*/
–>
</style>
<table width=”510″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td><input name=”search” type=”text” id=”search” class=”textfield” onfocus=”if(this.value==’标题’) {this.value=”;}this.style.color=’#333′;” onblur=”if(this.value==”) {this.value=’标题’;this.style.color=’#666′;}” value=”标题” maxlength=”22″/></td>
</tr>
<tr>
<td><textarea name=”textarea” class=”textarea”></textarea></td>
</tr>
</table>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics