Frame的使用和巩固

  • 框架导航的使用

index.html

  1. <html>

  2. <frameset cols="50%,50%">

  3. <frame src="4.html" /> //4.html中就写着导航的内容

  4. <frame src="5.html" name="show"/> //name="show"

  5. </frameset>

  6. </html>

    4.html

  7. <html lang="en">

  8. <body>

  9. <p><a href="1.html" target="show">1</a></p> //命名target="show"

  10. <p><a href="2.html" target="show">2</a></p>

  11. <p><a href="3.html" target="show">3</a></p>

  12. </body>

  13. </html>

2.html 3.html 5.html 改变它的背景颜色就好

  1. <html lang="en">
  2. <head>
  3. <meta charset="UTF-8">
  4. <title>2</title>
  5. </head>
  6. <style>
  7. body{
  8. background-color: #cacaca;
  9. }
  10. </style>
  11. <body>
  12. This is 2
  13. </body>
  14. </html>

来自为知笔记(Wiz)