服务粉丝

我们一直在努力
当前位置:首页 > 财经 >

【每日一练】108—一个登录页面的实现

日期: 来源:web前端开发收集编辑:杨小爱


写在前面

今天我们来写一个登录页面,这个在很多企业系统上都会用到,当然,一些网站上也用应用到,所以,它的应用场景还是很多的。

现在,我们一起来看一下它的最终效果:

以下是实现的源码。
HTML代码:
<!DOCTYPE html><html><head>  <title>【每日一练】108—一个登录页面的实现</title>  <meta name="viewport" content="width=device-width, initial-scale=1">  <meta charset="UTF-8" />  <link rel="stylesheet" href="css/style.css" type="text/css" media="all" /></head><body>   <section class="w3l-workinghny-form">        <div class="workinghny-form-grid">            <div class="wrapper">                <div class="logo">                    <h1><a class="brand-logo" href="index.html">工 作 登 录</a></h1>                </div>                <div class="workinghny-block-grid">                    <div class="workinghny-left-img align-end">                        <img src="images/1.png" class="img-responsive" alt="img" />                    </div>                    <div class="form-right-inf">                                    <div class="login-form-content">                            <form action="https://www.webqdkf.com" class="signin-form" method="post">                <div class="one-frm">                  <label>姓名</label>                  <input type="text" name="Name"  placeholder="" required="">                </div>                <div class="one-frm">                  <label>密码</label>                  <input type="password" name="Password"  placeholder="" required="">                </div>                                <label class="check-remaind">                                    <input type="checkbox">                                    <span class="checkmark"></span>                                    <p class="remember">记住我</p>                                </label>                                <button class="btn btn-style mt-3">登录 </button>                                <p class="already">如果你还没有账户 <a href="#">请注册</a></p>                            </form>                        </div>                    </div>                </div>            </div>        </div>        <div class="copyright text-center">            <div class="wrapper">                <p class="copy-footer-29">© 2022 工作登录页面 <a href="https://www.webqdkf.com">web前端开发</a></p>            </div>        </div>    </section></body></html>
CSS代码:
html {    scroll-behavior: smooth;}
body,html { margin: 0; padding: 0; font-family: 'Karla', sans-serif;}
* { box-sizing: border-box;}
.d-grid { display: grid;}
.d-flex { display: flex; display: -webkit-flex;}
.text-center { text-align: center;}
.text-left { text-align: left;}
.text-right { text-align: right;}
button,input,select { -webkit-appearance: none; outline: none; font-family: 'Karla', sans-serif;}
button,.btn,select { cursor: pointer;}
a { text-decoration: none;}
img { max-width: 100%;}
ul { margin: 0; padding: 0}
h1,h2,h3,h4,h5,h6,p { margin: 0; padding: 0}
p { color: #666; font-size: 18px; line-height: 25px;}
.p-relative { position: relative;}
.p-absolute { position: absolute;}
.p-fixed { position: fixed;}
.p-sticky { position: sticky;}
.btn,button,.actionbg,input { border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; -o-border-radius: 4px; -ms-border-radius: 4px;}
.btn:hover,button:hover { transition: 0.5s ease; -webkit-transition: 0.5s ease; -o-transition: 0.5s ease; -ms-transition: 0.5s ease; -moz-transition: 0.5s ease;}
.wrapper { width: 100%; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto;}
@media (min-width: 576px) { .wrapper { max-width: 540px; }}
@media (min-width: 768px) { .wrapper { max-width: 720px; }}
@media (min-width: 992px) { .wrapper { max-width: 960px; }}
@media (min-width: 1200px) { .wrapper { max-width: 1140px; }}
.wrapper-full { width: 100%; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto;}
.w3l-workinghny-form .logo { text-align: center;}
.w3l-workinghny-form .logo a.brand-logo { display: inline-block; text-align: center; font-size: 50px; line-height: 1.1em; font-weight: 700; color: #212529; margin-bottom: 30px; text-transform: capitalize; letter-spacing: -1px;}
.w3l-workinghny-form .align-end { align-self: flex-end; padding: 2em;}
.w3l-workinghny-form .logo a.brand-logo span { font-weight: 300;}
.w3l-workinghny-form h1 { font-size: 50px; line-height: 1.1em; font-weight: 700; color: #3f3a64;}
.w3l-workinghny-form { position: relative; z-index: 0; padding: 2em 0px; display: grid; align-items: center; height: 100vh;}
.w3l-workinghny-form .pos-relative { position: relative;}
.w3l-workinghny-form .copyright { margin-top: 20px;}
.w3l-workinghny-form p.copy-footer-29 a { color: #495057;}
.w3l-workinghny-form p.copy-footer-29 a:hover { color: #4361ee;}
.w3l-workinghny-form h2 { font-size: 30px; color: #fff; margin-bottom: 15px;}
.w3l-workinghny-form .workinghny-block-grid { display: grid; grid-template-columns: 1.2fr 1fr; grid-gap: 70px; width: 90%; margin: 0 auto; align-items: center;}
.w3l-workinghny-form .login-form-content { padding: 2em 0em;}
.w3l-workinghny-form .one-frm label { font-style: normal; font-size: 16px; color: #343a40; display: block; margin-bottom: 10px; font-weight: 400;}
.w3l-workinghny-form input { background: transparent; border: none; border-bottom: 2px solid #212529; color: #777; background:transparent; font-size: 13px; line-height: 20px; padding: 12px 15px; width: 100%; margin-bottom: 30px; border-radius: 0; outline: none;}
.w3l-workinghny-form input:focus { background: transparent; border-bottom: 2px solid #00a6bc; box-shadow: none;}
.w3l-workinghny-form .btn-style { font-size: 18px; color: #fff; width: 100%; background: #00a6bc; border: none; height: 55px; font-weight: 700; border-radius: 6px; transition: .3s ease; -webkit-transition: .3s ease; -moz-transition: .3s ease; -ms-transition: .3s ease; -o-transition: .3s ease; box-shadow: 0 3px 6px 0 rgba(0,0,0,0.2);}
.w3l-workinghny-form .btn-style:hover { background: #4311ee; transform: translateY(-3px); box-shadow: 0 6px 6px 0 rgba(0,0,0,0.2);}
.w3l-workinghny-form p.already,.w3l-workinghny-form p.already a { font-size: 18px; line-height: 25px; color: #495057; margin: 25px 0 0; text-align: center;}
.w3l-workinghny-form p.remember { color: #495057; line-height: 20px}
.w3l-workinghny-form p.already a { color: #495057; font-weight: 700;}
.w3l-workinghny-form p.already a:hover { color: #4361ee;}
.w3l-workinghny-form .check-remaind input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0;}
.w3l-workinghny-form .check-remaind { display: block; position: relative; padding-left: 35px; cursor: pointer; margin: 5px 0px 30px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;}
.w3l-workinghny-form .check-remaind input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0;}
.w3l-workinghny-form .checkmark { position: absolute; top: 0px; left: 0; height: 21px; width: 21px; background-color: #F5F4F2; border-radius: 4px;}
.w3l-workinghny-form .check-remaind:hover input~.checkmark { background-color: #4361ee;}
.w3l-workinghny-form .check-remaind input:checked~.checkmark { background-color: #4361ee;}
.w3l-workinghny-form .checkmark:after { content: ""; position: absolute; display: none;}
.w3l-workinghny-form .check-remaind input:checked~.checkmark:after { display: block;}
.w3l-workinghny-form .check-remaind .checkmark:after { left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);}::-webkit-input-placeholder { color: #777;}
::-moz-placeholder { color: #777;}
:-ms-input-placeholder { color: #777;}
:-moz-placeholder { color: #777;}@media (max-width: 992px) { .w3l-workinghny-form .workinghny-block-grid { grid-template-columns: 1fr; grid-gap: 10px; width: 100%; } .w3l-workinghny-form .login-form-content { padding: 0em 0em 2em 0; } .workinghny-left-img { order: 2; }
.w3l-workinghny-form .logo a.brand-logo { font-size: 40px; margin-bottom: 10px; }
.w3l-workinghny-form { height: auto; }}
@media (max-width: 667px) { .w3l-workinghny-form .align-end { padding: 0em; }}
@media (max-width: 480px) { .w3l-workinghny-form .logo a.brand-logo { font-size: 35px; }
.w3l-workinghny-form h2 { font-size: 22px; }}
@media (max-width: 415px) { .w3l-workinghny-form .copyright { margin-top: 30px; }}

写在最后

以上就是【每日一练】的全部内容,希望今天的小练习对你有用,如果你觉得有帮助的话,请点赞我,关注我,并将它分享给你身边做开发的朋友,也许能够帮助到他。

我是杨小爱,我们明天见。

推荐阅读

【每日一练】01~100练大合集汇总



学习更多技能

请点击下方公众号

相关阅读

  • 当我跑800/1000米时,我在想什么

  • 盼望着,盼望着,冬天就要到了,800/1000米的测试又开始了(并不是很盼望)。不过作为拥有坚强意志的whuers,哪怕是在(气温高达28℃的)冬日,也要完成体测(也没有其他选择了吧)!800-1000米,是一
  • 每日单词: pertain

  • pertain英 [pə'teɪn] 美 [pər'teɪn]vi.关于;从属;适合TOEF GRE◉常用例句(1) This letter does not pertain to politics.(2) Learning the specific set of vocabulary w
  • 明向大和尚 佛法教理开示 | 贪嗔痴病

  • 嗔,就是不喜欢的、对自己不利的不想要。排斥的心理就是嗔。得不到满足,你就会生嗔恨心。只要我们有贪、嗔、痴烦恼,你的苦就断不了。生、老、病、死,是通过我们的肉眼,能观察到的
  • 聊一聊 AS 的一些好用的功能

  • 文章开始前先墨迹几句,好久没写文章了,这段时间公司确实挺忙,也没抽出时间,上一篇文章还是三月初写的,距今已经两个多月啦,不能再这样下去了,虽然我不能像一些大佬那样周更、甚至日
  • 我会这样日常用ChatGPT练英语

  • 前两天写了篇《用ChatGPT学英语指南》,今天再做两点补充,希望我的学习思路对你也有启发。1.向 AI 提问社群里有位老师朋友提了个问题:第 48 题可以选 C 吗?我的结论是选 played
  • 我跟 ChatGPT 吵起来了

  • 什么是 ChatGPT 呢?我们直接来问一下 ChatGPT 就好啦。嗯,ChatGPT 使用起来非常简单,只需要登陆它的网站,输入一个问题并按下回车,它就能给你解答。这个目前之所以这么火,是因为它

热门文章

  • “复活”半年后 京东拍拍二手杀入公益事业

  • 京东拍拍二手“复活”半年后,杀入公益事业,试图让企业捐的赠品、家庭闲置品变成实实在在的“爱心”。 把“闲置品”变爱心 6月12日,“益心一益·守护梦想每一步”2018年四

最新文章

  • 【每日一练】108—一个登录页面的实现

  • 写在前面今天我们来写一个登录页面,这个在很多企业系统上都会用到,当然,一些网站上也用应用到,所以,它的应用场景还是很多的。现在,我们一起来看一下它的最终效果:以下是实现的源码
  • 一些顶级 JavaScript 技巧汇总

  • 英文 | https://medium.com/stackanatomy/top-javascript-shorthand-techniques-64920294f0c8JavaScript包含各种对典型编程思想有用的一些技巧,在实际开发中,我们通常希望减
  • 安利3本最近准备看的高分好书!

  • 设为 星 标 永不失联~~生命的过程就是经历的过程。一本好书,所展开的世界是无穷无尽的。翻开书页,和不同时空的自己对话。那些关于时光的思考,帮你戒掉浮躁,静下心来,收获未来成
  • 所有推荐过的书单合集,一次性打包带走!

  • 大家好,我是小K!众所周知,我是一个热爱读书、热爱分享的人,一路走来,从微博到公众号,整理了太多了资源,也分享了太多的资源,人送外号信息检索小能手,几乎没有什么资料是我找不到的,关
  • 周末到啦!强烈推荐这3本高分好书!

  • 设为 星 标 永不失联~~生命的过程就是经历的过程。一本好书,所展开的世界是无穷无尽的。翻开书页,和不同时空的自己对话。那些关于时光的思考,帮你戒掉浮躁,静下心来,收获未来成