<style type="text/css"> body{font-size:20px;} </style> </head> <body> <div style="100px;height:2px;background:green"></div> </body>
可以设置font-size:0px来解决