2012-11-24 117 views
0

所以我想做出看起来像这样的文本字段:自定义图像边界

enter image description here

可以调整作为文本是这样

前以某种方式或长或短; enter image description hereenter image description here

这里是我得到了部分enter image description hereenter image description hereenter image description here

那么,有没有简单的方法来使与CSS?

+1

为什么不能简单地用CSS'border'和'背景color'(也可能是'箱shadow'和'边境radius')和节省“背景图像”拼图的烦恼吗? –

+0

如果我使用盒子阴影,它不会在Internet Explorer中正常工作,对吧? – user1826795

+0

http://stackoverflow.com/questions/8181699/box-shadow-in-ie7-and-ie8 – MikeSmithDev

回答

0

<style> 


.class_name{border: 1px solid white;-moz-border-radius:19px; 
-webkit-border-radius: 19px; 
border-radius:5px; 
-moz-box-shadow: 0px 0px 5px #666; 
-webkit-box-shadow: 0px 0px 5px #666; 
box-shadow: 0px 0px 5px #666; 
padding:2px 10px; 
text-align:center; 
width:70px; height:auto; 
margin:0px auto;} 
</style> 

HTML代码

<div class="class_name">sample</div> 
+0

我想OP会尝试输入一些东西,用户可以输入。 –