當前位置:編程學習大全網 - 源碼下載 - 怎樣在Blog裏面放上每天的天氣預報呢?

怎樣在Blog裏面放上每天的天氣預報呢?

在添加天氣預報之前,妳得先添加(自定義面板),然後輸入標題,勾選(顯示源代碼),在空白面板裏粘貼如下代碼,另外需要註意的是,代碼顯示可能不是妳想要的城市,那麽妳就需要修改為妳的城市的代碼。

幾段超酷實用的天氣預報代碼,整理如下:

第壹種:

<iframe src=/iframe/weather/130101.html"></ifreame>

效果:

第四種:

<iframe width="469" height="218" border="0" align="center" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src=/cgi-bin/news_weather_search?city=貴陽 allowTransparency="true"></iframe>

效果:

第五種:

<IFRAME ID='ifm1' WIDTH='405' HEIGHT='332' ALIGN='center' MARGINWIDTH='0' MARGINHEIGHT='0' HSPACE='0' VSPACE='0' FRAMEBORDER='0' SCROLLING='NO' SRC="/24.htm"></IFRAME>

效果:

第六種:

<iframe width="145" height="130" border="0" align="center" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="/Weather/news_new.html" allowTransparency="true"></iframe>

效果:

第七種:

以前很流行的壹段代碼(在Google上搜到的90%都是這壹段),現在已經不能用了,特此寫出來,以免大家浪費精力:

<iframe width="150" height="240" frameborder="0" scrolling="No" src='/cgi-bin/news_qq_search?city=xxx'></iframe>

其中的“xxx”是每個城市的代碼:比如武漢的就是%CE%E4%BA%BA

下面是其他的壹些城市的編碼:

上海-%C9%CF%BA%A3

北京-%B1%B1%BE%A9

青島-%C7%E0%B5%BA

濟南-%BC%C3%C4%CF

武漢-%CE%E4%BA%BA

福州-%B8%A3%D6%DD

以下得到其他城市的代碼的方法:

baidu搜索壹下城市的名稱,比如"重慶",然後地址欄中的那個代碼就是了這些中文字符如何編碼變成%D6%D8%C7%EC這種的。比如得到的網址是:

/s?wd=%D6%D8%C7%EC

後面的%D6%D8%C7%EC即是。

現在我給大家推薦壹個專門提供天氣預報和免費天氣預報代碼服務的網站:

天氣123:中國城市天氣預報(/)

只要復制粘貼該網站提供的代碼就可以了。

如下是3款(南京)效果圖:

第八種:

<iframe src="/small_page/chengshi_1189.html" width=160 height=248 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center id=url></iframe>

第九種:

<iframe src="/small_page/chengshi_1189.html?c0=F9DC68&c1=white&c2=FEFCE0&t1=red&bg=white&w=160&text=no" width=160 height=248 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center id=url></iframe>

第十種:

<iframe src="/small_page/chengshi_1189.html?c0=red&c1=FF9900&bg=F4FFF4&w=160&h=20&text=yes" width=160 height=21 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center id=url></iframe>

該天氣代碼高級使用方法:

如果您會HTML語言,您還可以在iframe代碼中的url後面加參數,如:

chengshi_321.html?c0=F9DC68&c1=white&c2=FEFCE0&t1=red&bg=white&w=160&h=250&text=no

其中 c0 表示表格第壹行背景顏色,c1,c2表示表格其他行間隔的背景顏色,t1表示標題顏色,bg 表示頁面北京顏色,w表示表格寬度 h 表示表格高度

當 text=yes 時,將會出現滾動的天氣文字,建議您自己調試看看,如:

chengshi_321.html?c0=red&c1=FF9900&bg=F4FFF4&w=160&h=20&text=yes

註意:顏色請不要加 # 符號,如 #FF9900 請寫成 FF9900

````我的BLOG教程裏面的東西 如果看著很煩瑣 歡迎去我的BLOG 仔細研究

  • 上一篇:什麽是開源電影?
  • 下一篇:我是淘寶分銷商買家拍下後如何發貨
  • copyright 2024編程學習大全網