Blogger Information
Blog 26
fans 0
comment 0
visits 15636
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
a链接、锚点、img图片、iframe的应用
庄周梦蝶
Original
679 people have browsed it

a链接、锚点、img图片、iframe框架的应用

a链接

  1. <a href="http://www.baidu.com " target="_blank">百度</a>
  2. <a href="http://www.baidu.com" target="_self">百度</a>

href里写链接地址,target里写链接地址的方式:blank是重新弹出一个窗口,self是本地刷新


iframe框架

  1. <a href="http://www.baidu.con" targer="iframe">百度</a>
  2. <iframe id="iframe" srcdoc="点击上面的百度"></iframe>

想让链接的内容显示到iframe框架里需要把targer里的内容写成iframe框架ID的值


锚点

  1. <a href="#dibu">到达底部</a>
  2. <div name="dibu">
  3. <a href="#">直通顶部</a>
  4. </div>

a链接里href写的要和你要到达地方的name写的一样,前面加#。直接写#会直达顶部。


img图片

  1. <img src="1.jpg" alt="这是图片说明" title="这是鼠标放上去显示的内容" width="100">

src里写图片地址,alt写图片显示不了后的内容,title写鼠标放上去显示的内容,可以设置宽高,设置一个后会自动按比例缩放,但一般用css来设置。

Correcting teacher:天蓬老师天蓬老师

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post