Blogger Information
Blog 5
fans 0
comment 0
visits 1627
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
后台管理系统(iframe)和HTML样式优先级
寻梦人
Original
464 people have browsed it

1.后台管理系统

代码:

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title>后台管理系统</title>
  8. </head>
  9. <body>
  10. <div class="box">
  11. <header>
  12. <h2>后台管理系统</h2>
  13. <div class="user">
  14. <span>admin</span>
  15. <button>退出</button>
  16. </div>
  17. </header>
  18. <nav>
  19. <p><a href="../1.16/课程表.html" target="main">课程表</a></p>
  20. <hr />
  21. <p><a href="../1.16/表单.html" target="main">注册表单</a></p>
  22. <hr />
  23. <p><a href="../1.17/video.html" target="main">小视频</a></p>
  24. <hr />
  25. </nav>
  26. <main>
  27. <iframe src="../1.16/课程表.html" name="main" frameborder="0"></iframe>
  28. </main>
  29. </div>
  30. </body>
  31. <style>
  32. * {
  33. margin: 0;
  34. padding: 0;
  35. box-sizing: border-box;
  36. }
  37. header {
  38. width: 100wh;
  39. height: 10vh;
  40. background-color: rgb(3, 102, 3);
  41. color: white;
  42. }
  43. header > h2 {
  44. float: left;
  45. padding: 15px;
  46. }
  47. header > .user {
  48. float: right;
  49. padding: 20px 30px;
  50. }
  51. header button {
  52. padding: 0 6px;
  53. }
  54. nav {
  55. float: left;
  56. width: 15vw;
  57. height: 90vh;
  58. background-color: bisque;
  59. text-align: center;
  60. padding-top: 50px;
  61. }
  62. nav > p {
  63. margin: 10px;
  64. }
  65. nav > hr {
  66. margin: 0 auto;
  67. }
  68. nav a {
  69. text-decoration: none;
  70. }
  71. main {
  72. float: right;
  73. height: 90vh;
  74. width: 80vw;
  75. }
  76. main > iframe {
  77. width: 100%;
  78. height: 100%;
  79. }
  80. </style>
  81. </html>

效果图



HTML样式优先级

代码

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title>Document</title>
  8. <!-- 外部样式 -->
  9. <link rel="stylesheet" href="./css/style-case.css" />
  10. </head>
  11. <!-- 文档样式(内部样式) -->
  12. <style>
  13. h1 {
  14. color: yellow;
  15. }
  16. </style>
  17. <body>
  18. <!-- 行内样式 -->
  19. <h1 style="color: red">php.cn</h1>
  20. <hr />
  21. <h2>HTML元素的样式优先级:</h2>
  22. <h3>行内样式>文档样式>外部样式</h3>
  23. </body>
  24. </html>

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!