今天看别人的Blog的时候记得Blog上有个天气预报还是挺方便的,所以就在自己的Blog上也加了一个。
喜欢简单的方式,所以选择了走马灯的方式,这样不占地方。
分享给大家,如果有喜欢的,可以按下面的方式加入。
大家可以到http://www.qtol.net/weather/?city=南京:
选择您需要的城市,点击“查看天气及代码”,新窗口中就会有城市天气预报的代码了,有两种方式,可以根据blog的版面进行设计,不过有点遗憾的是不能更改颜色。
我用的是第二种方式:
----------------------------
<style type='text/css'>
.qtol {font-size: 12px; color=#336699 }
a.qtol:link { text-decoration: none; color=#336699 }
a.qtol:visited { text-decoration: none; color=#336699 }
a.qtol:hover { text-decoration: underline; color=#336699 }
</style>
<marquee direction='left' scrollamount='3' onMouseOver='this.stop();' onMouseOut='this.start();'>天气预报:
<script language=javascript src='http://weather.qtol.net/?type=2&province=江苏&city=南京&citycode=58238'></script>
</marquee>
-------------------------