HTML之frameset导航框架
2017-07-12 本文已影响84人
蔡镇泉
身为一个刚从机械转到学程序的菜鸟小白,第一次写文章,排版各方面都比较粗糙,过程也难免会有错漏,望大神指正,不慎感激,写这些也只是为了总结知识点罢了。好了,废话不多说了。
一、新建all.html###
<pre><html>
<frameset cols="120,*">
<frame name="index" src="index.html" noresize/>
<frame name="content" src="frame_a.html" noresize/>
</frameset>
</html></pre>
二、新建index.html###
<pre><html>
<head>
<style type="text/css">
a{text-decoration:none}
</style>
</head>
<body>
<a href="frame_a.html" target="content">frame_a</a><br/>
<a href="frame_b.html" target="content">frame_b</a><br/>
<a href="frame_c.html" target="content">frame_c</a>
</body>
</html></pre>
三、新建frame_a.html###
<pre><body bgcolor="red">
frame_a
</body></pre>
四、新建frame_b.html###
<pre><body bgcolor="yellow">
frame_b
</body></pre>
五、新建frame_c.html###
<pre><body bgcolor="blue">
frame_c
</body></pre>
效果图如下:###
![](https://img.haomeiwen.com/i1599190/4bc38faa51aab520.png)
![](http://upload-images.jianshu.io/upload_images/1599190-3a3ea235571625d4.png)
![](http://upload-images.jianshu.io/upload_images/1599190-6865a950eb3f1637.png)