CSS 日常练习----login 发表于 2018-08-30 | 分类于 技术 , Blog记录日常 CSS 练习的小知识点 —— loginlogin点击预览123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152<!doctype html><html><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>登陆</title> <style> * { padding: 0; margin: 0; } /* 清除浮动 */ .clearfix:after { content: ""; display: table; clear: both; } html, body { height: 100%; } body { font-family: "Microsoft YaHei"; background: #EBEBEB; font-weight: 300; font-size: 15px; color: #333; overflow: hidden; } a { text-decoration: none; color: #000; } a:hover { color: #F87982; } /*home*/ #home { padding-top: 100px; } /*logint界面*/ #login { padding: 20px 30px 30px; width: 300px; background: #FFF; margin: auto; border-radius: 3px; box-shadow: 0 3px 3px rgba(0, 0, 0, 0.3); } #login h3 { font-size: 18px; line-height: 25px; font-weight: 300; letter-spacing: 3px; margin-bottom: 20px; color: #C8C8C8; text-align: center; } #login label { color: #C8C8C8; display: block; height: 35px; padding: 0 10px; font-size: 12px; line-height: 35px; background: #EBEBEB; margin-bottom: 10px; position: relative; } #login label input { font: 13px/20px "Microsoft YaHei"; background: none; height: 20px; border: none; margin: 7px 0 0 10px; width: 245px; outline: none; letter-spacing: normal; z-index: 1; position: absolute; right:0; } #login label span { display: block; height: 35px; color: #F30; width: 100px; position: absolute; top: 0; left: 190px; text-align: right; padding: 0 10px 0 0; z-index: 0; display: none; } #login button { font-family: "Microsoft YaHei"; cursor: pointer; width: 300px; height: 35px; background: #FE4E5B; border: none; font-size: 14px; line-height: 30px; letter-spacing: 3px; color: #FFF; position: relative; margin-top: 10px; -moz-transition: all 0.2s ease-in; -webkit-transition: all 0.2s ease-in; -o-transition: all 0.2s ease-in; transition: all 0.2s ease-in; } #login button:hover { background: #F87982; color: #000; } /*头像*/ .avator { display: block; margin: 0 auto 20px; border-radius: 50%; } </style></head><body><div id="home"> <form action="" id="login"> <h3>用户登入</h3> <img class="avator" src="avatar.png" width="96" height="96"/> <label>邮箱/名称<input type="text" name="userName" style="width:215px;"/><span>邮箱为空</span></label> <label>密码<input type="password" name="pass"/><span>密码为空</span></label> <button type="button">登入</button> </form></div></body></html>本文作者: bobo本文链接: https://www.anynote.me/2254078746.html版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!