登录  /  注册
博主信息
博文 11
粉丝 0
评论 0
访问量 5053
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
0317作业
至亲难忘
原创
358人浏览过
导航条
  1. <header>
  2. <nav>
  3. <a href="">首页</a>
  4. <a href="">社区</a>
  5. <a href="">挪车</a>
  6. <a href="">视频</a>
  7. <a href="">福利</a>
  8. </nav>
  9. <a href="/form.html"><button>登录</button></a>
  10. </header>
  11. <style>
  12. header {
  13. height: 50px;
  14. background-color: black;
  15. padding: 0 2em;
  16. display: flex;
  17. place-content: space-between;
  18. }
  19. nav {
  20. display: flex;
  21. text-align: center;
  22. line-height: 50px;
  23. }
  24. nav a {
  25. min-width: 5em;
  26. color: floralwhite;
  27. text-decoration: none;
  28. flax: 1;
  29. }
  30. nav a:hover{
  31. color: red;
  32. background-color: chartreuse;
  33. transition: 0.3s;
  34. }
  35. header a button:last-child{
  36. border: none;
  37. width: 3em;
  38. height: 2em;
  39. }
  40. header a button:hover{
  41. color: chartreuse;
  42. background-color: blue;
  43. transition: 0.3s;
  44. }
  45. </style>
  • 效果图导航条

    登录页面

    1. <form action="" method="post">
    2. <fieldset style="display: inline-grid; gap: 1em">
    3. <legend style="text-align: center;">用户注册</legend>
    4. <div class="username">
    5. <label for="">用户名:</label>
    6. <!-- type="text":单行文本框 -->
    7. <!-- autofocus:页面初始化/加载成功时,焦点自动落入。 -->
    8. <!-- required:必填项,不写不能提交 -->
    9. <input type="text" id="username" name="username" value="" placeholder="不少于六位数" autofocus required>
    10. </div>
    11. <div class="password">
    12. <label for="">密&nbsp &nbsp码:</label>
    13. <input type="password" id="password" name="password" value="">
    14. </div>
    15. <div class="code">
    16. <label for="code">验证码:</label>
    17. <input type="text" id="code" name="code">
    18. </div>
    19. <button>提交</button>
    20. </fieldset>
    21. </form>
  • 登录页面登录页面

    Gird属性

    1. <div class="grid1">
    2. <div class="grid2">属性演示</div>
    3. </div>
    4. <style>
    5. .grid1 {
    6. height: 150px;
    7. width: 300px;
    8. display: grid;
    9. grid-template-columns: 100px 100px 100px;
    10. grid-template-rows: 50px 50px 50px;
    11. }
    12. .grid1 > .grid2{
    13. background-color: chartreuse;
    14. /* grid-row: 2 / 3;
    15. grid-column: 2 / 3 ; */
    16. 1.grid-area: 1 / 1 / span 1 / span 3;
    17. 2.grid-area: 1 / 1 / 2 / 4;
    18. }
    19. </style>
  • 1.效果图效果图
  • 2.效果图效果图
批改老师:PHPzPHPz

批改状态:合格

老师批语:作业标题最好不要使用日期,可以根据作业内容来取
本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系admin@php.cn举报处理!
全部评论 文明上网理性发言,请遵守新闻评论服务协议
0条评论
作者最新博文
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号

  • 登录PHP中文网,和优秀的人一起学习!
    全站2000+教程免费学