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


<!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>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值