首页 >web前端 >html教程 > 正文

怎样利用iframe让自己的网页可以显示天气

原创2018-01-26 09:58:4101175
这次给大家带来怎样利用iframe让自己的网页可以显示天气,用iframe让自己的网页可以显示天气的注意事项有哪些,下面就是实战案例,一起来看一下。

css:

代码如下:

*{margin:0;padding:0;list-style-type:none;} 
a,img{border:0;} 
body{font:12px/180% Arial, Helvetica, sans-serif, "新宋体";} 
/* demo */ 
.demo{width:800px;margin:0 auto;} 
.demo div{margin:40px 0 0 0;}

html:

代码如下:

<div class="demo"> 
<div> 
<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=2&num=5" width="650" height="70" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> 
</div> 
<div> 
<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=7" style="border:solid 1px red" width="225" height="90" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> 
</div> 
<div> 
<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=9" width="800" height="60" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> 
</div> 
<div> 
<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=11" width="500" height="15" frameborder="0"></iframe> 
</div> 
<div> 
<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=13" width="650" height="221" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> 
</div> 
<div> 
<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=19" width="800" height="120" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> 
</div> 
</div>

相信看了这些案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!

相关阅读:

在HTML的列表中,dl(dt,dd)、ul(li)、ol(li) 有什么不同

HTML的head头标签有哪些用法

怎样解决在html中竖列文字竖列显示不全的问题

以上就是怎样利用iframe让自己的网页可以显示天气的详细内容,更多请关注php中文网其它相关文章!

php中文网最新课程二维码

声明:本文原创发布php中文网,转载请注明出处,感谢您的尊重!如有疑问,请联系admin@php.cn处理

  • 相关标签:iframe 自己的 网页
  • 相关文章

    相关视频


    网友评论

    文明上网理性发言,请遵守 新闻评论服务协议

    我要评论
  • 专题推荐

    推荐视频教程
  • javascript初级视频教程javascript初级视频教程
  • jquery 基础视频教程jquery 基础视频教程
  • 视频教程分类