网站Mini天气显示代码

2021-05-04 188649阅读 1评论

位置显示在左上角,根据IP计算位置,不占空间,放在公告代码里面即可

<div id="tp-weather-widget"></div>
<!-- 天气插件 -->
		<script>
			(function(a,h,g,f,e,d,c,b){b=function(){d=h.createElement(g);c=h.getElementsByTagName(g)[0];d.src=e;d.charset="utf-8";d.async=1;c.parentNode.insertBefore(d,c)};a["SeniverseWeatherWidgetObject"]=f;a[f]||(a[f]=function(){(a[f].q=a[f].q||[]).push(arguments)});a[f].l=+new Date();if(a.attachEvent){a.attachEvent("onload",b)}else{a.addEventListener("load",b,false)}}(window,document,"script","SeniverseWeatherWidget","//cdn.sencdn.com/widget2/static/js/bundle.js?t="+parseInt((new Date().getTime() / 100000000).toString(),10)));
			window.SeniverseWeatherWidget(\'show\', {
			flavor: "bubble",
			location: "WX4FBXXFKE4F",
			geolocation: true,
			language: "zh-Hans",
			unit: "c",
			theme: "auto",
			token: "ac1d036a-99f3-4f88-ae98-f795bb93a9f0",
			hover: "disabled",
			container: "tp-weather-widget"
			})
		</script>
<!-- 天气插件 -->


文章版权声明:除非注明,否则均为小宜技术猫原创文章,转载或复制请以超链接形式并注明出处。

发表评论

表情:
评论列表 (有 1 条评论,188649人围观)
网友昵称:Mr.losfer
Mr.losferV铁粉沙发
2021-05-21 来自天津 回复
没有用阿[Frown]
取消
微信二维码
微信二维码
支付宝二维码