html+css上传文件控件美化

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <meta charset="utf-8" />
    <style>
        .fileinput-button {
            position: relative;
            display: inline-block;
            background: #9d1ccd;
            border: 1px solid #99D3F5;
            border-radius: 4px;
            padding: 4px 12px;
            overflow: hidden;
            color: white;
            text-decoration: none;
            text-indent: 0;
            line-height: 20px;
        }

            .fileinput-button input {
                position: absolute;
                right: 0px;
                top: 0px;
                opacity: 0;
                -ms-filter: 'alpha(opacity=0)';
                font-size: 200px;
                cursor: pointer;
            }
    </style>
</head>
<body>
    <div style="text-align:center">
        <span class="fileinput-button">
            <span>上传</span>
            <input type="file" />
        </span>
    </div>
</body>
</html>

 

原文链接:https://www.cnblogs.com/move-up/p/7352047.html
本文来源 爱码网,其版权均为 原网址 所有 与本站无关,文章内容系作者个人观点,不代表 本站 对观点赞同或支持。如需转载,请注明文章来源。

© 版权声明

相关文章