软件登录页
1.css外部样式、js框架的引入
<link rel="stylesheet" type="text/css" href="css/login.css"/> <script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
2.html标签构成
div#div>img+div#div1
form>label*3>input^p
<div id="div"> <img src="img/denglu_bg.jpg" alt="" style="width: 100%; height: 100%; z-index: -1;" /> <div id="div1"> <form action=""> <label for=""> 用户名:<input type="text" class="text" /> </label> <label for=""> 密 码:<input type="password" class="text" /> </label> <label for=""> 验证码:<input type="text" size="4" maxlength="4" id="codetxt" /> <img src="img/code.png" id="codeimg"/> </label> <p> <input type="submit" value="登录" class="btn1" /> <input type="reset" value="重置" class="btn2" /> </p> </form> </div> </div>
3.编写样式
*{
margin: 0;
padding: 0;
}
body{
font-size: 14px;
font-family: "黑体";
color: #0802A2;
}
#div{
width: 100%;
height: 100%;
position: absolute;
z-index: -1;
}
#div1{
width: 416px;
height: 250px;
background-image: url(../img/login.jpg);
position: absolute;
top: 26%;
left: 60%;
}
#div1 form{
width: 300px;
height: 150px;
margin-top: 75px;
margin-right: 0;
margin-bottom: 0;
margin-left: 15px;
}
#div1 form label{
display: block;
margin-top: 5px;
margin-right: 0;
margin-bottom: 10px;
margin-left: 35px;
}
.text{
width: 130px;
height: 19px;
line-height: 19px;
}
#codetxt{
height: 19px;
line-height: 19px;
}
#codeimg{
position: relative;
top: 8px;
left: 3px;
cursor: pointer;
}
#div1 form p{
text-align: center;
}
.btn1, .btn2{
width: 55px;
height: 28px;
line-height: 28px;
cursor: pointer;
margin-top: 5px;
margin-right: 0;
margin-bottom: 0;
}
.btn1{
margin-left: 6px;
}
.btn2{
margin-left: 15px;
}
吐槽一下


还没有留言,还不快点抢沙发?