Blogger Information
Blog 6
fans 0
comment 0
visits 3249
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Iframe+a标签搭配应用布局和html元素的样式来源与优先级介绍
远方
Original
437 people have browsed it

简介:①Iframe+a标签搭配应用布局②html元素的样式来源与优先级介绍

Iframe+a标签搭配应用布局

源码附图

附图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>iframe 后台管理简单布局</title>
  8. <style>
  9. nav{
  10. padding-bottom:5px;
  11. padding-top:5px;
  12. }
  13. nav>p{
  14. text-align: center;
  15. }
  16. nav>p>a{
  17. color:#ffffff;
  18. }
  19. </style>
  20. </head>
  21. <body>
  22. <header>
  23. <strong>Manager</strong><a href="a1.html" target="content" style="margin-left:15px;">退出</a>
  24. </header>
  25. <nav style="background-color: rgb(12, 230, 157);width:100px;margin-top:15px;">
  26. <p><a href="a2.html" target="content">菜单一</a></p>
  27. <p><a href="a3.html" target="content">菜单二</a></p>
  28. <p><a href="a4.html" target="content">菜单三</a></p>
  29. </nav>
  30. <section>
  31. <iframe src="a1.html" frameborder="0" name="content" style="background-color:rgb(173, 173, 214);padding-left:10px;margin-top:15px;"></iframe>
  32. </section>
  33. </body>
  34. </html>

html元素的样式来源与优先级介绍

代码运行效果图

附件2

源码示例

  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. <!-- 外部样式 -->
  8. <link rel="stylesheet" href="./style/css/h.css">
  9. <title>html元素的样式来源与优先级</title>
  10. <!-- 文档样式 -->
  11. <style>
  12. h1{
  13. color:#ffff00;
  14. background-color:#c9c9c9;
  15. }
  16. </style>
  17. </head>
  18. <body>
  19. <!-- 行内样式 -->
  20. <h1 style="color:#ff0000;">hello 2023</h1>
  21. </body>
  22. </html>

总结:通过Iframe标签的name元素和a标签的target元素配合使用达到点击不同链接在当前页面跳转到对应的iframe子页面,标签元素孰能生巧,多练、多练、多练。

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!