这是我非常挑剔,但我想把当前天气状况的大写字母改为小写。多云到多云。另外,我该如何设置文本的样式?我以前从未在jquery中使用过html。
html = '<span> It is currently ' + weather.currently + ' and </span>';
http://codepen.io/anon/pen/eNwzJp
http://simpleweatherjs.com/
发布于 2015-08-20 10:56:56
只需使用
weather.currently.toLowerCase()
对于样式,您可以将类添加到span标记中
<span class="sample">
并在css中提供样式详细信息-
.sample {
font-weight: bold;
}
发布于 2015-08-20 10:59:40
有一个javascript方法toLowerCase()和toUpperCase()可以解决你的问题。引用是here。
也是如此:
weather.currently.toLowerCase()
对于样式,您可以查看此site
https://stackoverflow.com/questions/32108809
复制相似问题