解决方法
编辑
我想包括owencm的评论,让人们绊倒这个问题,因为我发现它很优雅:
CSS
input.holo[type='text'] { /* You can set width to whatever you like */ width: 200px; font-family: "Roboto","Droid Sans",sans-serif; font-size: 16px; margin: 0; padding: 8px 8px 6px 8px; position: relative; display: block; outline: none; border: none; background: bottom left linear-gradient(#a9a9a9,#a9a9a9) no-repeat,bottom center linear-gradient(#a9a9a9,#a9a9a9) repeat-x,bottom right linear-gradient(#a9a9a9,#a9a9a9) no-repeat; background-size: 1px 6px,1px 1px,1px 6px; } input.holo[type='text']:hover,input.holo[type='text']:focus { background: bottom left linear-gradient(#0099cc,#0099cc) no-repeat,bottom center linear-gradient(#0099cc,#0099cc) repeat-x,bottom right linear-gradient(#0099cc,#0099cc) no-repeat; background-size: 1px 6px,1px 6px; }
HTML
<input type='text' class='holo'/>
的jsfiddle
http://jsfiddle.net/QKm37/
原始解决方案
<span style=" border-bottom: solid 1px cyan; border-left: solid 1px cyan; margin: 20px; border-right: solid 1px cyan; overflow: visible; max-height: 0.2em; display: inline-block; padding: 2px; "> <input type="text" style=" outline: none; border: none; background: transparent; display: inline-block; position: relative; bottom: 0.8em; "> </span>