如何利用iframe讓自己的網頁可以顯示天氣

php中世界最好的语言
發布: 2018-01-26 09:58:41
原創
2509 人瀏覽過

這次帶給大家怎樣利用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的頭標有哪些用法

#怎麼解決在html中豎列文字豎列顯示不全的問題

以上是如何利用iframe讓自己的網頁可以顯示天氣的詳細內容。更多資訊請關注PHP中文網其他相關文章!

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!