码迷,mamicode.com
首页 > Web开发 > 详细

PHP(6)只记录我的学习历程 html(链接和框架标志)

时间:2015-01-09 14:23:25      阅读:238      评论:0      收藏:0      [点我收藏+]

标签:框架   浏览器   标签   html   php   

1.main.html

<html>
	<meta charset="utf-8">
	<head>
		<title>框架链接标志</title>
	</head>
<!--这里来建立浏览器框架-->
	<frameset cols="25%,*">
		<frame src="menu.html" scrolling="no" name="Left">
		<frame src="page1.html" scrolling="auto" name = "Main">
	<noframes>
		<body>
			<p>对不起浏览器不支持框架</p>
		</body>
	</noframes>
	</frameset>
</html>

2.menu.html
<html>
	<meta charset="utf-8">
	<head>
		<title>目录</title>
	</head>
	<body>
		<p><font color="yellow">目录</font>
		<p><a href="page1.html" target="Main">链接到第一页</a></p>
		<p><a href="page2.html" target="Main">链接到第二页</a></p>
	</body> 
</html>

3.page1.html

<html>
	<meta charset="utf-8">
	<body>
		<p align="center"><font color="yellow">这是第一页1111111!</p>
	</body>
</html>

4.page2.html

<html>
	<meta charset="utf-8">
	<body>
		<p align="center"><font color="black">这是第二页111111111!</p>
	</body>
</html>

打开Mian.html如下效果

技术分享

技术分享

在同一个页面框架打开了2个不同的html

学习用到的标签有以下标签

链接标志

1.<a>...</a>这就是html中的链接标签它有2个必须填写的属性href=""这是链接内容,如果你要使用图片来当作链接的话,可以使用以下属性<img src>。来实现图片跳转具体的写法我为<a href="http://www.baidu.com">这是百度的链接</a>,<a href="http://www.baidu.com"><img src"图片"></a> name属性是来标记一个标签名字的,这个是不可缺少的。

框架标志

1.<frameset>...</frameset>是用来在html中定义主文档中各个框架的定义,它有两个属性一个rows用于行定位,一个cols用于列定位取值可以是百分比或者星号。系统默认的是从左到右从上到下

2.<fram>标志用于放在<frameset>...<frameset>之间,用来定义某一个具体的框架它有2个必须赋值的属性src是指跳转路径,绝对路径或者相对路径都是可以的,它是用来打开一个新的html文件name就是将要显示在哪一个框架中    它还有另外2个属性scrolling用来指定是否需要显示滚动轴,yes on 跟auto.auto就是在需要时显示,不需要则不显示 另一个noresize则不需要赋值直接加入就行,目的为禁止用户调整一个框架的大小

3<nofram>...</nofram>在不支持框架的浏览器才会用到。在里边接上<body>...</body>来表达不支持框架的意思

PHP(6)只记录我的学习历程 html(链接和框架标志)

标签:框架   浏览器   标签   html   php   

原文地址:http://blog.csdn.net/quanhaoh/article/details/42553115

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!