登录页面制作

制作一个登录页面

首先,我说一下我的编辑器,它是Visual Studio Code 2017版本开发工具我主要的码代码都在这软件里进行开发,这次的登陆页面就用它编写的,好了接下来请看步骤:

效果图:

在这里插入图片描述

  1. 制作框架
    先编写div盒子代码附上名称:
<body>
        <div class="nav">
            
       </div>
     <div class="centent">
             <div class="centent1"></div>
        <div class="centent2">
               <div class="img">
                
           </div>
                <div class="img">
                
           </div>
           </div>
       <div class="input1">
              
       </div>
       <div class="bottom">
           
       </div>
       
     </div>
</body>
  1. 给框架加上样式
  <style>

  body{
	     background:url("image/logo.jpg") no-repeat center center;    
	     background-size:cover;
       background-attachment:fixed;
}
  .nav{
	     width:100%; 
		   height:100px; 
			 background-color: rgba(38,103,255,0.9);
		
			 font-size:30px;
			 text-align:left;
		   
}
  .nav b{
		     margin-left:16%; 
				 margin-top:30px; 
				 color: cornsilk; 
				 font-family: "楷体";
}
	.centent{
	         width:400px; 
			     height:400px; 
			     margin-left:68%; 
			     margin-top:160px; 
			     background-color:rgba(102,204,255,0.7);
			 
}
	.centent1{
	          width:400px; 
			      height:50px; 
			      text-align:center;
			      line-height:45px;
			      color:#eff1f8;
			      font-family:"楷体";
			      font-size:30px;
			      background-color:rgba(38,103,255,0.7);
			 
}
	.centent2{
	          width:400px; 
			      height:140px;
			      margin-top:30px;
			     
}
	.centent2 img{
		            width:40px; 
								height:35px; 
								float:left; 
								opacity: 0.7; 
								margin-top:25px; 
								margin-left:50px;
}
	.centent2 input{
		              font-size:15px; 
									margin-top:25px; 
									background-color:rgb(102, 204, 255);
}
	.input1{
		      margin-top:5px; 
					text-align:center;
}
	.input1 input{ 
		            font-size:20px; 
								background-color:rgba(102,204,255,0.5);
}
	.bottom{
		      width:400px; 
	        margin-top:20px;
			    height:114px; 
}
.bottom img{
	          width: 400px;
					  height:120px;
	          opacity:0.4;
						
}
  </style>
  1. 写上内容
<body>
  <div class="nav">
	         <b>思忆</b>
		       <hr width="38%"; height="1"; color="LavenderBlush	"; align="left";></hr>
		       <hr width="28%"; height="1"; color="Cyan"; align="left";></hr>
		       <hr width="18%"; height="1"; color="ForestGreen"; align="left";></hr>
	</div>
  <div class="centent">
          <div class="centent1"><b>用户登录</b></div>
	 <div class="centent2">
	        <div class="img"><img src="image/logo3.jpg"/>
		     <input type="text" name="" value="" placeholder="用户名" "this.placeholder=''" "this.placeholder='用户名'" style="width:200px; height:30px;" />
		</div>
		     <div class="img"><img src="image/logo4.jpg"/>
		     <input type="text" name="" value="" placeholder="密码" "this.placeholder=''" "this.placeholder='密码'" style="width:200px; height:30px;" />
		</div>
		</div>
	<div class="input1">
	       <input type="button" value="登录">
	       <input type="button" value="注册">
	</div>
	<div class="bottom">
         <img src="image/logo2.jpg"/>
	</div>
	
  </div>
 </body>
  完结
以上就是我本人辛苦做出来的页面代码希望能对大家有点用但其中也有不足的望大家包含因为我也是小菜鸟一个。
完整的代码页
<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>登陆页面</title>
  <style>

  body{
	     background:url("image/logo.jpg") no-repeat center center;    
	     background-size:cover;
       background-attachment:fixed;
}
  .nav{
	     width:100%; 
		   height:100px; 
			 background-color: rgba(38,103,255,0.9);
		
			 font-size:30px;
			 text-align:left;
		   
}
  .nav b{
		     margin-left:16%; 
				 margin-top:30px; 
				 color: cornsilk; 
				 font-family: "楷体";
}
	.centent{
	         width:400px; 
			     height:400px; 
			     margin-left:68%; 
			     margin-top:160px; 
			     background-color:rgba(102,204,255,0.7);
			 
}
	.centent1{
	          width:400px; 
			      height:50px; 
			      text-align:center;
			      line-height:45px;
			      color:#eff1f8;
			      font-family:"楷体";
			      font-size:30px;
			      background-color:rgba(38,103,255,0.7);
			 
}
	.centent2{
	          width:400px; 
			      height:140px;
			      margin-top:30px;
			     
}
	.centent2 img{
		            width:40px; 
								height:35px; 
								float:left; 
								opacity: 0.7; 
								margin-top:25px; 
								margin-left:50px;
}
	.centent2 input{
		              font-size:15px; 
									margin-top:25px; 
									background-color:rgb(102, 204, 255);
}
	.input1{
		      margin-top:5px; 
					text-align:center;
}
	.input1 input{ 
		            font-size:20px; 
								background-color:rgba(102,204,255,0.5);
}
	.bottom{
		      width:400px; 
	        margin-top:20px;
			    height:114px; 
}
.bottom img{
	          width: 400px;
					  height:120px;
	          opacity:0.4;
						
}
  </style>
 </head>
 <body>
  <div class="nav">
	         <b>思忆</b>
		       <hr width="38%"; height="1"; color="LavenderBlush	"; align="left";></hr>
		       <hr width="28%"; height="1"; color="Cyan"; align="left";></hr>
		       <hr width="18%"; height="1"; color="ForestGreen"; align="left";></hr>
	</div>
  <div class="centent">
          <div class="centent1"><b>用户登录</b></div>
	 <div class="centent2">
	        <div class="img"><img src="image/logo3.jpg"/>
		     <input type="text" name="" value="" placeholder="用户名" "this.placeholder=''" "this.placeholder='用户名'" style="width:200px; height:30px;" />
		</div>
		     <div class="img"><img src="image/logo4.jpg"/>
		     <input type="text" name="" value="" placeholder="密码" "this.placeholder=''" "this.placeholder='密码'" style="width:200px; height:30px;" />
		</div>
		</div>
	<div class="input1">
	       <input type="button" value="登录">
	       <input type="button" value="注册">
	</div>
	<div class="bottom">
         <img src="image/logo2.jpg"/>
	</div>
	
  </div>
 </body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值