Html
    Css
    Js

    
                        
* {
	margin:0;
	padding:0;
	box-sizing:border-box;
}
a {
	text-decoration:none;
	color:black;
}
.login_href {
	position:absolute;
	top:0;
	left:50%;
	font-size:40px;
	transform:translateX(-50%);
	z-index:1;
}
.login {
	position:relative;
	z-index:2;
	top:200px;
	left:500px;
	width:400px;
	height:250px;
	background-color:white;
	border-radius:5px;
	box-shadow:0 0 2px 2px white;
	cursor:pointer;
	display:none;
}
.login_top .title {
	padding-top:10px;
	text-align:center;
	font-size:20px;
	font-weight:500;
}
#closeBtn {
	position:absolute;
	right:-10px;
	top:-10px;
	width:40px;
	height:40px;
	font-size:14px;
	text-align:center;
	line-height:40px;
	background-color:white;
	border-radius:50%;
	cursor:default;
}
.login_input .username {
	margin:23px 0;
}
.login_input .username,.password {
	padding-left:10px;
	width:250px;
	height:30px;
	font-size:12px;
	outline:none;
}
.username_title,.password_title {
	font-size:14px;
}
.username_title {
	padding-left:40px;
}
.password_title {
	padding-left:26px;
}
.login_btn {
	margin:40px auto;
	width:100px;
	text-align:center;
}
.cover {
	position:absolute;
	top:0;
	left:0;
	width:100%;
	height:100%;
	background-color:rgba(0,0,0,.4);
	z-index:0;
	transition:.5s;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

js登录框可拖动

更新时间:2022-04-10 23:16:50

位置可能需要微调

0