【实训】简单的登录样式练习

一个简单的html登录界面。
时间:2021-1-28

效果图:
在这里插入图片描述
css样式:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登录样式</title>
<style>

*{margin:0;padding:0;box-sizing:border-box;}

body{background:url(bg.jpg);font-family: "微软雅黑", sans-serif;}

.headtop{background:url(topbg.jpg);height:28px;}

.login {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -150px 0 0 -150px;
    width:300px;
    height:300px;
}
.login h1 { color:#555555; text-shadow: 0px 10px 8px #CDC673; letter-spacing:2px;text-align:center;margin-bottom:20px; }

input{
    padding:10px;
    width:100%;
    color:white;
    margin-bottom:10px;
    background-color:#555555;
    border: 1px solid black;
    border-radius:4px;
    letter-spacing:2px;
}

form button{
    width:100%;
    padding:10px;
    background-color:#CDC673;
    border:1px solid black;
    border-radius:4px;
    cursor:pointer; 
}
</style>
</head>
<body>
<div class="headtop"></div>
<div class="login">
  <h1>Login</h1>
  <form action="" method="post">
    <input type="text" name="user" placeholder="用户名" required="required">
    <input type="password" name="password" placeholder="密  码" required="required">
  <button type="submit">登录</button>
  </form>
</div>
</body>
</html>

git:simpleLoginStyle

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值