首页前端开发HTMLHtml制作简单而漂亮的登录页面

Html制作简单而漂亮的登录页面

时间2024-01-26 23:32:03发布访客分类HTML浏览776
导读:收集整理的这篇文章主要介绍了Html制作简单而漂亮的登录页面,觉得挺不错的,现在分享给大家,也给大家做个参考。 先来看看样子。 htML源码:XML/HTML Code复制内容到剪贴板 <!DOCTYPE html&g...
收集整理的这篇文章主要介绍了Html制作简单而漂亮的登录页面,觉得挺不错的,现在分享给大家,也给大家做个参考。

先来看看样子。

htML源码:

XML/HTML Code复制内容到剪贴板
  1. !DOCTYPE html>   
  2. html lang="en">   
  3. head>   
  4.     meta charset="UTF-8">   
  5.     tITle> Login/title>   
  6.     link rel="stylesheet" type="text/css" href="LOGin.css"/>   
  7. /head>   
  8. body>   
  9.     div id="login">   
  10.         h1> Login/h1>   
  11.         form method="post">   
  12.             input type="text" required="required" placeholder="用户名" name="u"> /input>   
  13.             input type="password" required="required" placeholder="密码" name="p"> /input>   
  14.             button class="but" type="submit"> 登录/button>   
  15.         /form>   
  16.     /div>   
  17. /body>   
  18. /html>   

css代码:

CSS Code复制内容到剪贴板
  1. html{   
  2.     width: 100%;   
  3.     height: 100%;   
  4.     overflowhidden;   
  5.     font-stylesans-serif;   
  6. }   
  7. body{   
  8.     width: 100%;   
  9.     height: 100%;   
  10.     font-family'Open Sans',sans-serif;   
  11.     margin: 0;   
  12.     background-color#4A374A;   
  13. }   
  14. #login{   
  15.     positionabsolute;   
  16.     top: 50%;   
  17.     left:50%;   
  18.     margin: -150px 0 0 -150px;   
  19.     width300px;   
  20.     height300px;   
  21. }   
  22. #login h1{   
  23.     color#fff;   
  24.     text-shadow:0 0 10px;   
  25.     letter-spacing1px;   
  26.     text-aligncenter;   
  27. }   
  28. h1{   
  29.     font-size: 2em;   
  30.     margin: 0.67em 0;   
  31. }   
  32. input{   
  33.     width278px;   
  34.     height18px;   
  35.     margin-bottom10px;   
  36.     outlinenone;   
  37.     padding10px;   
  38.     font-size13px;   
  39.     color#fff;   
  40.     text-shadow:1px 1px 1px;   
  41.     border-top1px solid #312E3D;   
  42.     border-left1px solid #312E3D;   
  43.     border-right1px solid #312E3D;   
  44.     border-bottom1px solid #56536A;   
  45.     border-radius: 4px;   
  46.     background-color#2D2D3F;   
  47. }   
  48. .but{   
  49.     width300px;   
  50.     min-height20px;   
  51.     displayblock;   
  52.     background-color#4a77d4;   
  53.     border1px solid #3762bc;   
  54.     color#fff;   
  55.     padding9px 14px;   
  56.     font-size15px;   
  57.     line-heightnormal;   
  58.     border-radius: 5px;   
  59.     margin: 0;   
  60. }   

总结:
复制代码代码如下:input type="text" required="required" **placeholder="用户名"** name="u"> /input>
input type="password" required="required" **placeholder="密码"** name="p"> /input>

placeholder="用户名"的作用:占位符

以上就是本文的全部内容,希望对大家的学习有所帮助。

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!

上一篇: 深入理解html表单输入监听下一篇:关于表格table嵌套边框合并问题...猜你在找的HTML/Xhtml相关文章 了解HTTP Headers的方方面面 图文说明2022-04-12Html分层的box-shadow效果的示例代码2022-04-12html+css实现血轮眼轮回眼特效代码2022-04-12html实现随机点名器的示例代码2022-04-12HTML中table表格拆分合并(colspanrowspan)2022-04-12HTML页面滚动时部分内容位置固定不滚动的实现2022-04-12HTML+css盒子模型案例(圆半圆等)“border-radius” 简单易上手2022-04-12HTML通过表单实现酒店筛选功能2022-04-12HTML中的表单Form实现居中效果2022-04-12HTML+CSS制作心跳特效的实现2022-04-12 其他相关热搜词更多phpjavapython

若转载请注明出处: Html制作简单而漂亮的登录页面
本文地址: https://pptw.com/jishu/587424.html
解析HTML中rel=“nofollow”的作用及rel属性的使用 HTML表格标记教程(22):行的亮边框色属性BORDERCOLORLIGHT

游客 回复需填写必要信息