设置input 内容居中显示 . text-align:center 水平居中显示 [html] view plaincopyprint? <style type="text/css"> input.text{text-align:center;padding:10px 20px;300px;} </style> <input class="text" type="text" value="水平居中" />