您现在的位置是: 首页 > 一周天气 一周天气
天气查询代码_天气预报代码怎么用
tamoadmin 2024-11-21 人已围观
简介1.我要在百度空间里加一个天气预报,代码该放到哪里啊?2.在Dreamweer中怎么设置天气预报3.android天气预报控件省份和城市怎么实例化<iframe width="420" scrolling="no" height="60" frameborder="0" allowtransparency="true" src="://i.tianqi/index.php?c=code&id
1.我要在百度空间里加一个天气预报,代码该放到哪里啊?
2.在Dreamweer中怎么设置天气预报
3.android天气预报控件省份和城市怎么实例化
<iframe width="420" scrolling="no" height="60" frameborder="0" allowtransparency="true" src="://i.tianqi/index.php?c=code&id=12&icon=1&num=5"></iframe>
绝对管用 样式可以调整 有不懂的可以问我
我要在百度空间里加一个天气预报,代码该放到哪里啊?
我的网站用的代码:酒嘉市场信息网
这是泰安的天气预报代码,看你需要那种样式
样式一代码:<iframe src="" width=178 height=248 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center id=url></iframe>
样式二代码:<iframe src="" width=178 height=248 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center id=url></iframe>
样式三滚动代码:<iframe src="" width=178 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=178&h=250&text=no
其中 c0 表示 表格第一行背景颜色,c1,c2表示表格其他行间隔的背景颜色,t1表示 标题颜色,bg 表示页面北京颜色,w表示表格宽度 h 表示表格高度
当 text=yes 时,将会出现滚动的天气文字,建议您自己调试看看,如:
chengshi_321.html?c0=red&c1=FF9900&bg=F4FFF4&w=178&h=20&text=yes
注意:颜色请不要加 # 符号,如 #FF9900 请写成 FF9900
欢迎访问我的网站
在Dreamweer中怎么设置天气预报
如何在空间里加上天气预报2006/12/29 19:15其实只需要在自定义模板后面加上
{height:190px;background:url(://firetear/weather/weather.aspx) no-repeat 10px;background-color:#FFF }
步骤:首先要打开你的自定义模板4,在高级设置那里。这里就不用详细说了。
1、打开设置
2、模板设置
3、编辑自定义模板
4、找到#m_mylink4
5、在后面加入{height:190px;background:url(://firetear/weather/weather.aspx) no-repeat 10px;background-color:#FFF }
完整的如下。
#m_mylink4 {height:190px;background:url(://firetear/weather/weather.aspx) no-repeat 10px;background-color:#FFF }
直接把上面的代码加在CSS后面就行了
android天气预报控件省份和城市怎么实例化
Dreamweer中设置天气预报,需要插入属下代码:
<iframe src="://.weather.cn/weather/101190801.shtml "
width="245" height="110" marginwidth="0" marginheight="0" hspace="0" vspace="0"
frameborder="0" scrolling="no"></iframe>
那个连接链接到“中国天气”网。
需要其他城市的天气的时,就替换101190801这个字符串。比如我们搜索到上海,看见url是这样:://.weather.cn/weather/101020100.shtml
插入天气预报,效果如下:
使用Intent加载天气预报数据的服务,代码如下:
intent?=?new?Intent(LoadUI.this,?LoadDataService.class);
Bundle?bundle?=?new?Bundle();//?创建天气内容
bundle.putString("city",?WeatherUtil.getDefaultCity(LoadUI.this));
bundle.putBoolean("check",?false);?//?不编写内容
intent.putExtras(bundle);//?封装天气
LoadUI.this.startService(LoadUI.this.intent);
LoadDataService类是用于加载天气预报数据的服务类,这个类需要做以下几件事情:
city?=?URLEncoder.encode(city,?"UTF-8");