• 2014-12-28 iframe,style,body style


     

    一、<iframe></iframe>的用法

    <iframe src="http://baidu.com"></iframe>    内嵌网页,在一个网页中添加一个网页

    可以在括号里面添加  width  height  scrolling="no"(是否有滚动条)  framborder="0"(是否有边框)

    <frameset></frameset>  可以代替<body>,完全被另一个网页代替,类似于一个表格

    <frame/>   一个frame就是一个单元格

    可以在<frameset>括号里面添加各种用法:

    rows="100,200,*"  表示设置3行,每行高度100,200,无限大

    cols="200.*" 设置两列

    frameborder   边框

    在设置完行和列后,后面直接加frame网址,显示顺序为第一行第一列→第一行第二列→第二行第一列→第二行第二列……

    <frame src="http://baidu.com"/>

    <frame src="http://sina.com"/>

    <…………………………>

    <…………………>

    scrolling="no" noresize="noresize"(不能调整大小) 可以加入到<frame>中

    二、<style></style>的用法

    <style type="text/css"> <!--style放在head下使用--> body{ } <!--括号包起来-->

    p           <!--P表示控制<p>标签的内容--> { font:Verdana, Geneva, sans-serif }

    .name{ font:"Courier New", Courier, monospace  }  <!-- “.”+ 自己命名的名字,设置样式,然后在 “</style”后面需要引用的时候,加class选择,比如 在<p>引用 设置的.name属性:<p class="name"> </p>  -->

    #p1{ font-size:12px; color:#06C }   <!--通过#开头,加自定义的一个 ID ,设置样式,然后在style外,引用时,加ID=,例如:<p id="p1">  </p> -

    #p2,.name1{ font:Tahoma, Geneva, sans-serif }   <!-- p2,和name1通过逗号隔开,表示他们的样式设置,都为括号里面的内容 -->

    #p2 name1{ font:Verdana, Geneva, sans-serif }   <!--p2和name1通过空格连接,表示对id=p2的里面,class=name1的设置,两个要同时满足

    </style>

    <!-- 以上的写的样式,可以写在css格式的文件中,然后在head中加入<link rel="stylesheet" type="text/css" href="css.css" /> --> 用法 :<link rel="stylesheet" type="text/css" href="css.css" />

    三、body style的用法:

    <body style="font-size:36px"> <!--styel可以放在body之间任何一个标签位置做为属性使用-->  <!--style是一个特殊的标签的属性,集齐了许多控制样式的属性-->

    几种常用的body style:

    background-repeat:r布局设置 background-position:top   起点位置设置,顶点 background-attachment:fixed   背景不动,内容滚动 background-color   颜色     background-size    尺寸

    (若外部样式表已经设置过,优先执行body里的设置) </body>

    marquee:滚动信息 <marquee direction="left" bgcolor="#666666" behavior="alternate" style="marquee-speed:fast>这里为显示的内容</marquee>

    <!--direction:滚动的方向,bgcolor:背景颜色,behavior:滚动的方式,可以通过style的方式来设定-->

  • 相关阅读:
    制作自己的Docker镜像
    Docker 常见应用部署
    一文读懂Docker相关命令
    linux在下软件太卡?手把手教你配置国内镜像源
    2013年蓝桥杯省赛C组笔记
    java基本数据类型之间的转换
    h5中的分组元素figure、figcaption、hgroup元素介绍
    初识WSGI接口
    h5中的结构元素header、nav、article、aside、section、footer介绍
    提交 linux kernel 补丁流程备忘录
  • 原文地址:https://www.cnblogs.com/577521a/p/4203411.html
Copyright © 2020-2023  润新知