zoukankan      html  css  js  c++  java
  • html中的div span和frameset框架标签

    Div和span

    1.      div独占一层,由div九不允许有别的。

    2.      span标签不是独自占用一行,span一般用来设置字体。

    框架标签:


    什么是框架标签,就是把一个页面分成很多块,来分别显示显示不同的页面,下面看一下这个例子就能完全懂了。


    1.首先在同一个文件下建立如下的三个html文件。

    2.分别在left,top,right文件中写入相应的html代码。

    left:

    <html>
    <head>
    <title></title>
    </head>
    <body bgcolor=red>
    <a href="http://www.baidu.com" target="right">baidu</a>
    <a href="http://www.cnbeta.com" target="right">cnbeta</a>
    </body>
    </html>

    top:
    <html>
    <head>
    <title></title>
    </head>
    <body bgcolor=black>
    im top;
    </body>
    </html>

    right:
    <html>
    <head>
    <title></title>
    </head>
    <body bgcolor=green>
    im right;
    </body>
    </html>

    以上代码完全为了刻意的填充html内容。

    下面,index里面的代码是重头戏:

    <html>
    <head>
    <title></title>
    </head>
    <frameset rows="30%,*">  //frameset只能实现上下分块(row),或者左右分块(cols),若想实现上下左右分,则要在frameset标签里面嵌套frameset标签。
    <frame src="top.html" noresize="noresize"/>
    <frameset cols="30%,*">
    <frame src="left.html" noresize="noresize"/>
    <frame src="right.html" name="right"/>  //name的作用与left页面中a标签的target对应,当点击链接时,新的页面将会在target中打开。
    </frameset>
    </frameset>
    </html>
    最终效果如图:

  • 相关阅读:
    关于oc中自动引用计数 小结
    xcode6中导航栏 控制view用程序编写
    oc中深拷贝与浅拷贝
    关于c语言 指针课堂随笔
    oc中设置手动引用和自动引用图解
    利用xcode6做出牛的一逼的计算器
    利用xcode6 使用代码写出英格兰国旗
    oc中字典的应用详解
    c和oc排序程序与见解
    关于Xcode6beta2 新学者使用 工程的建立
  • 原文地址:https://www.cnblogs.com/CoderAyu/p/8490153.html
Copyright © 2011-2022 走看看