显示天气代码

<div class="tianqi fr" style="">
<style>
.wttemp font{color:#fff;}
</style>



<div id="tp-weather-widget"></div>
<script>(function(T,h,i,n,k,P,a,g,e){g=function(){P=h.createElement(i);a=h.getElementsByTagName(i)[0];P.src=k;P.charset="utf-8";P.async=1;a.parentNode.insertBefore(P,a)};T["ThinkPageWeatherWidgetObject"]=n;T[n]||(T[n]=function(){(T[n].q=T[n].q||[]).push(arguments)});T[n].l=+new Date();if(T.attachEvent){T.attachEvent("onload",g)}else{T.addEventListener("load",g,false)}}(window,document,"script","tpwidget","//widget.seniverse.com/widget/chameleon.js"))</script>
<script>tpwidget("init", {
    "flavor": "slim",
    "location": "WT3Q0FW9ZJ3Q",
    "geolocation": "disabled",
    "language": "zh-chs",
    "unit": "c",
    "theme": "chameleon",
    "container": "tp-weather-widget",
    "bubble": "enabled",
    "alarmType": "circle",
    "color": "#FFFFFF",
    "uid": "UEEAA7B61C",
    "hash": "4ecfa890d12424365920aa0d8ed77670"
});
tpwidget("show");</script>

            </div>

  



注:样式需要自己修改

posted @ 2019-03-20 09:53  yvioo  阅读(385)  评论(0编辑  收藏  举报