博客列表 >20190312-web前端基础作业登录页表单布局

20190312-web前端基础作业登录页表单布局

蛋炒饭的博客
蛋炒饭的博客原创
2019年03月13日 15:05:03743浏览

实例

用今天所学的知识,包裹背景,边框,表单,制作一个简单的登录页

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>登录页面</title>
	<!-- <link rel="icon" type="image/x-icon" href=""> -->
	<style type="text/css">
	  *{margin: 0;padding: 0;}
    body{
      background: #151517;
    }
    div{
      width: 400px;
      height: 350px;
      margin: 200px auto;
      background: rgba(188,185,198,0.4);
      border-radius: 10px;
      text-align: center;
    }
    img{
     width: 80px; 
     border-radius: 50%;
     margin-top: 50px;
    }
    input{
      width: 300px;
      height:30px;
      margin-top: 15px;
      border-radius: 6px;
      border: none;/*去掉元素自带边框*/
      padding-left: 15px;
    }
    button{
      border: none;
      width: 200px;
      height: 35px;
      border-radius: 6px;
      background: #151517;
      color: #fff;
      margin-top: 30px;
    }
	</style>
</head>
<body>
  <div>
    <img src="http://img4.duitang.com/uploads/item/201412/24/20141224224554_SuYth.thumb.700_0.jpeg"> 
    <form action="" method="">
      <input type="text" name="" placeholder="请输入用户名...."><br>
      <input type="password" name="" placeholder="请输入密码...."><br>
      <button>登录</button>
    </form>
  </div>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例


声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议