当前位置: 移动技术网 > IT编程>网页制作>CSS > HTML(css+div)登录界面的建设(代码实例)

HTML(css+div)登录界面的建设(代码实例)

2018年09月29日  | 移动技术网IT编程  | 我要评论

小鱼儿与花无缺快播,预约你的未来,断箭下载

html(css+p)登录界面的建设(代码实例)

<!doctype html>  
<html>  
<head>  
<meta charset="utf-8">  
<title>login</title>  
<style type="text/css">  
*{  
    margin: 0;  
    padding: 0;  
}  
#wrap {  
    height: 719px;  
    width: 100;  
    background-image: url(4.jpg);  
    background-repeat: no-repeat;  
    background-position: center center;  
    position: relative;  
}  
#head {  
    height: 120px;  
    width: 100;  
    background-color: #66cccc;  
    text-align: center;  
    position: relative;  
}  
#foot {  
    width: 100;  
    height: 126px;  
    background-color: #cc9933;  
    position: relative;  
}  
#wrap .logget {  
    height: 408px;  
    width: 368px;    
    position: absolute;  
    background-color: #ffffff;  
    top: 20%;  
    right: 15%;  
}  
.logc a button {  
    width: 100%;  
    height: 45px;  
    background-color: #ee7700;  
    border: none;  
    color: white;  
    font-size: 18px;  
}  
.logget .logd.logdtip .p1 {  
    display: inline-block;  
    font-size: 28px;  
    margin-top: 30px;  
    width: 86%;  
}  
#wrap .logget .logd.logdtip {  
    width: 86%;  
    border-bottom: 1px solid #ee7700;  
    margin-bottom: 60px;  
    margin-top: 0px;  
    margin-right: auto;  
    margin-left: auto;  
}  
.logget .lgd img {  
    position: absolute;  
    top: 12px;  
    left: 8px;  
}  
.logget .lgd input {  
    width: 100%;  
    height: 42px;  
    text-indent: 2.5rem;  
}  
#wrap .logget .lgd {  
    width: 86%;  
    position: relative;  
    margin-bottom: 30px;  
    margin-top: 30px;  
    margin-right: auto;  
    margin-left: auto;  
}  
#wrap .logget .logc {  
    width: 86%;  
    margin-top: 0px;  
    margin-right: auto;  
    margin-bottom: 0px;  
    margin-left: auto;  
}  
  
  
.title {  
    font-family: "宋体";  
    color: #ffffff;  
    position: absolute;  
    top: 50%;  
    left: 50%;  
    transform: translate(-50%, -50%);  /* 使用css3的transform来实现 */  
    font-size: 36px;  
    height: 40px;  
    width: 30%;  
}  
  
.copyright {  
    font-family: "宋体";  
    color: #ffffff;  
    position: absolute;  
    top: 50%;  
    left: 50%;  
    transform: translate(-50%, -50%);  /* 使用css3的transform来实现 */  
    height: 60px;  
    width: 40%;  
    text-align:center;  
}  
      
  
#foot .copyright .img {  
    width: 100%;  
    height: 24px;  
    position: relative;  
}  
.copyright .img .icon {  
    display: inline-block;  
    width: 24px;  
    height: 24px;  
    margin-left: 22px;  
    vertical-align: middle;  
    background-image: url(%e7%94%b5%e5%ad%90%e9%82%ae%e4%bb%b6.png);  
    background-repeat: no-repeat;  
    vertical-align: middle;  
    margin-right: 5px;  
}  
      
.copyright .img .icon1 {  
    display: inline-block;  
    width: 24px;  
    height: 24px;  
    margin-left: 22px;  
    vertical-align: middle;  
    background-image: url(%e5%9c%b0%e5%9d%80.png);  
    background-repeat: no-repeat;  
    vertical-align: middle;  
    margin-right: 5px;  
}  
.copyright .img .icon2 {  
    display: inline-block;  
    width: 24px;  
    height: 24px;  
    margin-left: 22px;  
    vertical-align: middle;  
    background-image: url(%e8%81%94%e7%b3%bb%e6%96%b9%e5%bc%8f.png);  
    background-repeat: no-repeat;  
    vertical-align: middle;  
    margin-right: 5px;  
}  
#foot .copyright p {  
    height: 24px;  
    width: 100%;  
}  
</style>  
</head>  
  
<body>  
<p class="header" id="head">  
  <p class="title">企业人事管理系统</p>  
      
</p>  
      
<p class="wrap" id="wrap">  
    <p class="logget">  
            <!-- 头部提示信息 -->  
            <p class="logd logdtip">  
                <p class="p1">登录</p>  
            </p>  
            <!-- 输入框 -->  
            <p class="lgd">  
                <img src="img/logname.png" width="20" height="20" alt=""/>  
                <input type="text"  
                    placeholder="输入用户名" />  
            </p>  
            <p class="lgd">  
                <img src="img/logpwd.png" width="20" height="20" alt=""/>  
                <input type="text"  
                    placeholder="输入用户密码" />  
            </p>  
            <p class="logc">  
                <a href="" target="_self"><button>登 录</button></a>  
            </p>  
        </p>  
</p>  
      
<p class="footer" id="foot">  
  <p class="copyright">  
    <p>copyright © 2018 qunar.com inc. all rights reserved.</p>  
    <p class="img">  
        <i class="icon"></i><span>联系邮箱:jiankangsun@yahoo.com</span>  
    </p>  
      
    <p class="img">  
        <i class="icon1"></i><span>联系地址:合肥工业大学</span>  
    </p>  
        
    <p class="img">  
      <i class="icon2"></i><span>联系电话:18355042634</span>  
    </p>  
  
  
  </p>  
      
</p>  
      
      
</body>  
</html>  

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网