<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>自定义input[type='file']样式</title> </head> <body> <input type="file"/> <style type="text/css"> input{ 20px; height: 20px; cursor: pointer; } input:before{ content: ""; display: inherit; inherit; height: inherit; } </style> </body> </html>