Blogger Information
Blog 7
fans 0
comment 0
visits 2482
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
框架元素与CSS基础
alex
Original
492 people have browsed it

用<iframe>写一个简单的后台布局, 注意a.target与iframe.name的配合

  1. <!DOCTYPE html>
  2. <html lang="en">
  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>iframe示例:网站后台管理</title>
  8. </head>
  9. <body>
  10. <header>
  11. <h1>网站后台管理系统<small>(v1.0)</small></h1>
  12. <section>
  13. <em>admin</em>
  14. <button onclick="logout()">退出</button>
  15. </section>
  16. </header>
  17. <nav>
  18. <a href="https://www.php.cn/" target="content">php中文网</a>
  19. <a href="https://www.bilibili.com/" target="content">bilibili</a>
  20. <a href="https://laravel.com/" target="content">laravel</a>
  21. </nav>
  22. <iframe src="https://www.php.net/" frameborder="0" name="content"></iframe>
  23. <script>
  24. function logout()
  25. {
  26. return confirm('是否真的退出?')?alert("成功退出!"):false
  27. }
  28. </script>
  29. </body>
  30. </html>

实例演示html元素的样式来源与优先级(要有图示)

html元素样式来源与优先级

来源:自定义样式和预置样式
优先级:自定义样式>预置样式

预置样式

自定义样式

自定义样式来源和优先级

  1. 行内样式
  2. 文档样式
  3. 外部样式
  4. 优先级:行内样式>文档样式>外部样式

外部样式

文档样式

行内样式

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