将文件上传按钮透明,并覆盖到自定义上传文件按钮上去的方法

来源:互联网 发布:python周末培训 编辑:程序博客网 时间:2024/05/17 04:46


<!DOCTYPE html>

<html>
<head>

//通过下面样式将div调整为透明状态,并调整位置覆盖可见按钮

<style>

div

{

    position:fixed; 

    opacity:0.0;  //设置 div 元素的不透明级别(0.0~1.0);兼容所有浏览器

    filter:Alpha(opacity=0); /* IE8 以及更早的浏览器 */

    width:60px; //设置div的宽度

    top:304px;left:425px;height:20px;

}
</style>
</head>
<body>
        <dd>
            <span class="dd_left">网关客户端路径:</span>
            <span class="dd_right">
                <input type="text" name="GwClientPath" id="GwClientPath" class="qtext" readonly value="<{$config.GwClientPath}>" />
                <input type="button" value="浏览...">  //页面中实际显示的按钮,通过调整透明按钮的位置,将该按钮覆盖
                <font style="color:red;"> *</font>
            </span>
        </dd>

//设为透明状态的按钮:

<div>

    <input type="file" style="width:100%" accept="*" name="GwClientPath" hidefocus>

</div>


</body>
</html>

0 0
原创粉丝点击