博主信息
博文 10
粉丝 0
评论 0
访问量 8418
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
1019后台实例与样式选择器作业
onbind
原创
937人浏览过

后台实例

  1. <style>
  2. html, body{
  3. margin: 0;
  4. height: 100vh;
  5. }
  6. *{
  7. box-sizing: border-box;
  8. }
  9. .flex{
  10. display: flex;
  11. align-items: center;
  12. }
  13. .head{
  14. justify-content: space-between;
  15. width: 100%;
  16. height: 150px;
  17. padding: 0 30px;
  18. color: #333;
  19. background-color: aquamarine;
  20. }
  21. .head .left{
  22. font-size: 36px;
  23. }
  24. .head .right{
  25. font-size: 16px;
  26. }
  27. .head span{
  28. margin-left: 20px;
  29. }
  30. .box{
  31. height: calc(100% - 150px);
  32. }
  33. .ul{
  34. width: 250px;
  35. padding-top: 30px;
  36. height: 100%;
  37. background-color: beige;
  38. }
  39. .ul .item{
  40. width: 100%;
  41. padding: 0 20px;
  42. text-align: left;
  43. font-size: 16px;
  44. color: #333;
  45. border-bottom: 1px solid rgba(0, 0, 0, .5);
  46. height: 50px;
  47. line-height: 50px;
  48. display: block;
  49. }
  50. .ul .item.active{
  51. color: red;
  52. }
  53. .ul .item:last-child{
  54. border-bottom: 0;
  55. }
  56. .content{
  57. flex: 1;
  58. height: 100%;
  59. margin-left: 10px;
  60. background-color: aqua;
  61. }
  62. .content .ame{
  63. width: 100%;
  64. height: 100%;
  65. }
  66. </style>
  67. <header class="head flex">
  68. <div class="left">后台管理系统</div>
  69. <div class="right">admin <span>退出</span></div>
  70. </header>
  71. <div class="flex box">
  72. <nav class="ul">
  73. <a class="item" href="./demo.html" target="pages">首页</a>
  74. <a class="item active" href="./demo2.html" target="pages">用户管理</a>
  75. <a class="item" href="./demo3.html" target="pages">商品管理</a>
  76. <a class="item" href="./demo4.html" target="pages">分类管理</a>
  77. <a class="item" href="./demo5.html" target="pages">推荐管理</a>
  78. <a class="item" href="./demo6.html" target="pages">系统设置</a>
  79. </nav>
  80. <main class="content">
  81. <iframe src="./demo.html" name="pages" class="ame"></iframe>
  82. </main>
  83. </div>

效果图:
后台实例效果图

标签,属性选择器, 群组选择器

  1. <!-- 标签选择器 -->
  2. <style>div{color: red;}</style>
  3. <div>我是内容</div>
  4. <!-- class选择器 -->
  5. <style>.box{color: red}</style>
  6. <div class="box">我是内容</div>
  7. <!-- id选择器 -->
  8. <style>#myId{color: red;}</style>
  9. <div id="myId">我是内容</div>
  10. <!-- 属性选择器 -->
  11. <style>div[title='fonts']{color: red;}</style>
  12. <div title="fonts">我是内容</div>
  13. <!-- 群组选择器 -->
  14. <style>div.base{color: red;}.base.flex{font-size: 16px;}</style>
  15. <div class="base flex">我是内容</div>
批改老师:PHPzPHPz

批改状态:合格

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

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

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