您的位置:首页 > 其它

教你利用iframe在网页中显示天气

2014-10-05 01:34 369 查看
来源:http://www.ido321.com/921.html

css:

[code] *{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;}

[/code]

html:

[code] <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>

[/code]

部分效果:



我在项目中做了一个下面的效果



演示地址:http://jsfiddle.net/2yfL8x0g/embedded/result/

下一篇将告诉你怎么获取农历日期:http://www.ido321.com/926.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: