HTML基础 页面效果(标题图标、锚点、插入音乐,视频、滚动效果、嵌入网页)

1、在一个页面嵌入其他页面

      < iframe >------ < / iframe >

<iframe  src="要放在框架里面的网址或文件" height="" width="">  </ifrmae>

<iframe src="text.asp" height="200" width="600"></ifrmae >
scrolling="No" //意为滚动条不随内容改变而出现 -- 多余的内容会被自动隐藏! frameborder="0"   //嵌套页面边框 leftmargin="0" //左边距 topmargin="0" //上边距 onscroll="true" //当元素滚动条被滚动时执行脚本 ,在HTML 5 中定义了该元素

2、锚点

  英文名 anchor 是网页制作中超级链接的一种,像一个迅速定位器一样是一种页面内的超级链接,运用相当普遍。

锚点的创建 : 找定位然后创建到该锚点的链接。

(1)定义锚点

< h3  id = "top" >    这里是TOP部分        </h3>
< h3  id= "content">  这里是CONTENT部分    </h3>     
< h3  id= "foot">     这里是FOOT部分       </h3>

(2)用 <a></a>制作锚点链接                                         

  页面内的锚点访问

<a href= "#top" >      点击我链接到TOP        </a>
<a href= "#content">   点击我链接到CONTENT    </a>
<a href= "#foot">      点击我链接到FOOT       </a>
  不同页面之间的锚点访问
  页面地址后面加锚点标记                                               
//目标页面页面的地址是  http://文件路径/index.html
//访问foot锚点,  http://文件路径/index.html#foot  
<a href=" http://文件路径/index.html#foot"> 点击我跳转到 文件路径/index.html#foot  </a>

3、插入视频

       最直接简单有效的方法,点击任意一个视频网站下面的分享好友,复制粘贴 HTML 代码就可以,

(1)网络上的视频

  以优酷 为例插入一个学习英语的视频

<embed src='http://player.youku.com/player.php/Type/Folder/Fid//Ob//sid/XODQ1ODU5MjQ=/v.swf' quality='high' width='480' height='400' align='middle' allowScriptAccess='always' allowFullScreen='true' mode='transparent' type='application/x-shockwave-flash'>

</embed>

 (2)本地的视频

  这个要放到自己的根目录文件夹下面

<embed src="路径"width="480" height="400" align="middle" allowScriptAccess="always" allowFullScreen="true" mode="transparent" >

</embed>
// allowFullScreen="true" 视频可全屏可缩小

自动播放
    swf后面

       VideoIDS=XNDA3OTM4NA=&isAutoPlay=true&isShowRelatedVideo=false&embedid=-&showAd=0

4、插入音乐 

   <embed src = "音乐文件地址" >   </embed>  

在页面 title 标签下方添加音乐代码

<embed src = "音乐文件地址"  hidden="true" autostart="true" loop="true">   </embed>  //兼容主流浏览器如,谷歌,360

 hidden="true"       //隐藏播放器按钮 hidden="false"开启
 autostart="true"    //打开网页加载完后自动播放  默认 false  
 loop="true"         //循环播放; ( loop="false" 播放一次,loop="n" 播放 n 次 )
 startime="分:秒"    //设定乐曲的开始播放时间
 volume=0--100       //设定音量大小
 width height        //设定控制面板的大小

 5、滚动效果

< marquee> 我在滚动< / marquee>

< marquee direction="left"> 我在滚动< / marquee>

direction      //滚动方向(包括4个值:up、 down、 left和 right) 
behavior        //滚动方式(scroll:循环滚动,默认效果; slide:只滚动一次就停止; alternate:来回交替进行滚动)
scrollamount    //滚动速度(滚动速度是设置每次滚动时移动的长度,以像素为单位)
scrolldelay     //滚动延迟(设置滚动的时间间隔,单位是毫秒)
loop         //滚动循环(默认值是-1,滚动会不断的循环下去)
width、height    //滚动范围
bgcolor       //滚动背景颜色
hspace、vspace   //空白空间

6、标题栏小图标

<link  rel="shortcut  icon" type="image/x-icon" href="图片地址" media="screen"  />
 

原文地址:https://www.cnblogs.com/Tanghongchang/p/6608191.html