Blogger Information
Blog 37
fans 1
comment 0
visits 32624
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
1210作业(iframe与css基础)
Jason Pu?
Original
584 people have browsed it

一:基于iframe制作网站后台

Web端的后台管理员页面,基本都是页头,左侧菜单,右侧为主要页面。实现的方法有多种,iframe是最常见的一种,实现效果如下:

HTML代码:

  1. <body>
  2. <header>网站管理后台</header>
  3. <aside>
  4. <a href="img1/telet.png" target="content">添加/删除管理员 </a>
  5. <a href="img1/hotel.png" target="content">酒店管理</a>
  6. <a href="img1/travel.png" target="content">旅行社管理</a>
  7. <a href="img1/restrunt.png" target="content">餐饮管理</a>
  8. <a href="img1/store.png" target="content">店铺管理</a>
  9. </aside>
  10. <main>
  11. <iframe srcdoc="点击右侧" name="content"></iframe>
  12. </main>
  13. </body>

css样式代码:

  1. <style type="text/css">
  2. body{
  3. margin: 0;
  4. display: grid;
  5. grid-template-columns: 10em 1fr;
  6. }
  7. header{
  8. grid-column: span 2;
  9. height: 3em;
  10. background-color: #1363AD;
  11. font-size: 19px;
  12. }
  13. aside{
  14. display: grid;
  15. grid-template-rows: repeat(auto-fill,2em);
  16. background-color: #F2FAFD;
  17. text-align: center;
  18. }
  19. iframe{
  20. width: 100%;
  21. min-height: 42em;
  22. border: none;
  23. padding: 2em;
  24. }
  25. a{
  26. text-decoration: none;
  27. color: black;
  28. background-color: #D9EAF3;
  29. border-bottom: 1px solid darkgray;
  30. border-right: 1px solid darkgray;
  31. }
  32. </style>

css选择器优先级:

#ID选择器>.类选择器>标签选择器

例外:!importent:无限大

元素样式的四个来源:

Correcting teacher:天蓬老师天蓬老师

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