这个是我第一次写的网页,虽然有点丑,但是还是和你们分享一下啦!这个是仿百度写的,但是点击登录和百度的效果是一样的哦!(图片希望亲们自己去截图哦,改个路径就可以正常使用了哦!)
这是HTML和CSS代码
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>百度一下,你就知道</title>
<style>
body{
margin: 0;
padding: 0;
}
.tou{
margin-top: -32px;
}
.btn{
}
font:hover{
cursor: pointer;
color: red;
}
.back-img{
border: 1px solid #000000;
position: absolute;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background-color: #000000;
opacity: 0.3;
z-index: 100;
display: none;
}
.login{
/*border: 1px solid #000000;*/
width: 390px;
height: 500px;
position: absolute;
top:26%;
left: 35%;
background-color:white;
z-index: 110;
display: none;
}
.login-top{
position: absolute;
width: 100%;
height: 10%;
background-color: #F7F7F7;
}
.close-login{
display: block;
position: absolute;
right: 10px;
top: 5px;
width: 30px;
height: 30px;
text-align: center;
<