Blogger Information
Blog 10
fans 0
comment 0
visits 4856
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
1019后台实例与样式选择器作业
onbind
Original
554 people have browsed it

后台实例

  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>
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:继续加油,完成的不错
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post