日期:2014-05-17 浏览次数:20644 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <style type="text/css"> <!-- #inp{ font-size:13px; width:50%; height:30px; line-height:30px; border:1px solid #929292; overflow: hidden; } --> </style> </head> <body> <input type="text" name="title" value="why" id="inp" /> </body> </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <style type="text/css"> <!-- #inp{ font-size:13px; width:50%; border:1px solid #929292; overflow: hidden; [color=#FF0000] padding-top:10px; padding-bottom:10px;[/color] } --> </style> </head> <body> <input type="text" name="title" value="why" id="inp" /> </body> </html>
------解决方案--------------------
FF不支持INPUT的LINE-HEIGHT
------解决方案--------------------
input控件的样式比较麻烦
还跟<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
有关系
你可以设padding