本文主要是介绍iframe、nofollow、img中map,定义及如何正确使用?,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
iframe 的使用方法:
iframe 元素会创建包含另外一个文档的内联框架(即行内框架)。
<iframe src="/templets/bangtai181223/map.html" width="585px" height="586px" frameborder="0"
rel="nofollow" scrolling="no"></iframe>
属性 | 值 | 描述 |
---|---|---|
frameborder |
| 规定是否显示框架周围的边框。 |
height |
| 规定 iframe 的高度。 |
longdesc | URL | 规定一个页面,该页面包含了有关 iframe 的较长描述。 |
marginheight | pixels | 定义 iframe 的顶部和底部的边距。 |
marginwidth | pixels | 定义 iframe 的左侧和右侧的边距。 |
name | frame_name | 规定 iframe 的名称。 |
sandbox |
| 启用一系列对 <iframe> 中内容的额外限制。 |
scrolling |
| 规定是否在 iframe 中显示滚动条。 |
seamless | seamless | 规定 <iframe> 看上去像是包含文档的一部分。 |
src | URL | 规定在 iframe 中显示的文档的 URL。 |
srcdoc | HTML_code | 规定在 <iframe> 中显示的页面的 HTML 内容。 |
width |
| 定义 iframe 的宽度。 |
使用nofollow:
<meta name="robots" content="nofollow" > 不追踪链接,不传递权重。
<a rel="nofollow" href="#" >123</a> 只起到发现链接的作用,但不传递权重。
img、map 的使用:
<img src="/img.png" width="100%" usemap="#planetmap">
<map name="planetmap" id="planetmap">
<area shape="rect" coords="X,Y,截取部分的宽,Y-截取部分的高" href ="" target ="_blank" alt="" />
</map>注释:img 元素中的 "usemap" 属性引用 map 元素中的 "id" 或 "name" 属性(根据浏览器),所以我们同时向 map 元素添加了 "id" 和 "name" 属性。
这篇关于iframe、nofollow、img中map,定义及如何正确使用?的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!