js实现可拖动弹出登录框弹出层效果代码

代码语言:html

所属分类:弹出层

代码描述:js实现可拖动弹出登录框弹出层效果代码

代码标签: 拖动 弹出 登录 弹出 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>
<head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />



    <style type="text/css">

        body {

            padding: 0px;
            margin: 0px;
            font-size: 12px;
            font-family: "微软雅黑";
        }

        .link {
            margin-top:100px;
            font-size: 16px;
            text-align: center;
            line-height: 20px;
          
        }

        .ui-dialog {
            width: 380px;
            height: auto;
            display: none;
            position: absolute;
            z-index: 9000;
            top: 0px;
            left: 0px;
            border: 1px solid #D5D5D5;
            background: #fff;
        }

        .ui-dialog a {
            text-decoration: none;
        }

        .ui-dialog-title {
            height: 48px;
            line-height: 48px;
            padding: 0px 20px;
            color: #535353;
            font-size: 16px;
            border-bottom: 1px solid #efefef;
            background: #f5f5f5;
            cursor: move;
            user-select: none;
        }
        .ui-dialog-closebutton {
            width: 20px;
            height: 20px;
            display: block;
            position: absolute;
            top: 12px;
            right: 20px;
            background: url(//repo.bfw.wiki/bfwrepo/icon/5e1e7bc24ffa1.png) no-repeat;
            cursor: pointer;

        }
        .ui-dialog-closebutton:hover {

            background-position:  0 -20px
        }

        .ui-dialog-content {
            padding: 15px 20px;
        }
        .ui-dialog-pt15 {
            padding-top: 15px;
        }
        .ui-dialog-l40 {
            height: 40px;
            line-height: 40px;
            text-align: right;
        }

        .ui-dialog-input {
            width: 100%;
            height: 40px;
            margin: 0px;
            padding: 0px;
            border: 1px solid #d5d5d5;
            font-size: 16px;
            color: #c1c1c1;
            text-indent: 40px;
            outline: none;
        }
        .ui-dialog-input-username {
            background: url(//repo.bfw.wiki/bfwrepo/image/60e15ca99b27f.png) no-repeat 2px;
        }

        .ui-dialog-input-password {
            background: url(//repo.bfw.wiki/bfwrepo/image/60e15ce163aef.png) no-repeat 2px;
        }
        .ui-dialog-submit {
            width: 100%;
            height: 50px;
            background: #3b7ae3;
            border: none;
            font-size: 16px;
            color: #fff;
            outline: none;
            text-decoration: none;
            display: block;
            text-align: center;
            line-height: 50px;
        }
        .ui-dialog-submit:hover {
            background: #3f81b0;
        }

        .ui-mask {
            width: 100%;
            height: 100%;
            background: #000;
            position: absolute;
            top: 0px;
            height: 0px;
            z-index: 8000;
            opacity: 0.4;
            filter: Alpha(opacity=40);
        }
    </style>
</head>
<body>

    <div class="link">
        <a href="javascript:showDialog();">登录</a>
    </div>
    <div class="ui-mask" id="mask" onselectstart="return false"></div>

    <div class="ui-dialog" id="dialogMove" onselectstart='return false;'>
        <div class="ui-dialog-title" id="dialogDrag" onselectstart="return false;">

            登录

            <a class="ui-dialog-closebutton" href="javascript:hideDialog();"></a>

        </div>
        <div class="ui-dialog-content">
            <div class="ui-dialog-l40 ui-dialog-pt15">
                <input class="ui-dialog-input ui-dialog-input-username" type="input" value="手机/邮箱/用户名" />
            </div>
            <div class="ui-dialog-l40 ui-dialog-pt15">
                <input class="ui-dialog-input ui-dialog-input-password" type="input" value="密码" />
            </div>
            <div class="ui-dialog-l40">
                <a href="#">忘记密码</a>.........完整代码请登录后点击上方下载按钮下载查看

网友评论0