HTML+CSS登录页面

初步学习网页制作,今天制作了一个简单登录页面。

效果图如下:

背景图和logo可以自己选择喜欢的就可以

下面是实验代码

login.html

<!doctype html>
<html lang="en">
<link href="css/login.css" rel="stylesheet" type="text/css" />
<head>
	<meta charset="UTF-8">
	<title>登录</title>
</head> 
 
<body>
	<div class="logo_box"><img class="logo_img" src="images/pic1.jpg"></div>
	<div class="login_box">
		<h1 class="title">欢迎登录</h1>
		<input class="input_box" type="text" placeholder="用户名">
		<input class="input_box" type="password" placeholder="密码">
		<a href="default.html">
		<input class="button_box" type="button"  value="登录">
		</a>
	</div>
	
		<div class="weibu" style="text-align:center"  >
	<h1 class="sidebar_01" > 地址:山东省西南部梁山县城东南处梁山李逵家 联系方式:qq_54000767</h1>
	<h1 class="sidebar_01">梁山好汉李逵版权所有</h1>
	</div>
	
</body>
</html>

 login.css

@charset "UTF-8";
 
	body {
		background-color: #8ea4f8;
		background-image: url(https://desk-fd.zol-img.com.cn/t_s960x600c5/g2/M00/0B/00/ChMlWV5cfnGIRZowABrsm_3XvNcAANhjQBayi4AGuyz757.jpg);
		background-repeat: no-repeat;
		background-size: cover; 
 
	}
	.login_box {
		width: 400px;
		height: 400px;
		background-color: #fff;
		margin: auto;
		margin-top: 150px;
		border-radius: 5px;
		overflow: hidden;  /*title设置margin-top无效,给父元素设置overflow:hidden;*/
	}
	.title {
		text-align: center;
		font-size: 28px;
		color: #000;
		margin-top: 80px;
		margin-bottom: 10px;
		letter-spacing: 3px;
		font-family: sans-serif;
	}
	.input_box {
		width: 300px;
		height: 30px;
		width: 300px;
		height: 40px;
		padding-left: 10px;
		margin-top: 20px;
		margin-left: 50px;
	}
	.button_box {
		width: 300px;
		height: 35px;
		width: 300px;
		height: 40px;
		margin-top: 20px;
		margin-left: 50px;
		border-radius: 5px;
		background-color: #64a9d9;
		cursor: pointer;
		color: #fff;
		
	}
	.logo_box {
		position: absolute;
		background-color: #fff;
		width: 100px;
		height: 100px;
		border-radius: 100px;
		top: 100px;
		left: 46%;
		border: solid 5px #A68364;
		text-align: center;
	}
	.logo_img {
		margin-top: 20px;
	}
	/*尾部版权  */
	.sidebar_01{
	font-size:20px;
}
.weibu{
	margin-top:300px;
	font-style: normal;
	 border-style: groove;
	 background-color:FFCC33;
  	color:white;
}
	
	

背景图片是直接用的网页上面的图片,background-image:url(........)为背景图片,可选取自己喜欢的,修改一下图片路径即可。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Vous oublie@

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值