[英]Changing uppercase to lowercase in simpleweather.js
This is very nitpicky of me but I want to change the upper case letters of current weather status to lower case. 这对我很挑剔,但我想将当前天气状况的大写字母更改为小写。 Mostly Cloudy to mostly cloudy.
大部分多云至大部分多云。 Also how would I style the text?
另外,我将如何设置文字样式? I've never used html in jquery before.
我以前从未在jQuery中使用过html。
html = '<span> It is currently ' + weather.currently + ' and </span>';
http://codepen.io/anon/pen/eNwzJp http://codepen.io/anon/pen/eNwzJp
Just use 只需使用
weather.currently.toLowerCase()
weather.currently.toLowerCase()
For style you can add the class to your span tag 对于样式,您可以将类添加到span标签
<span class="sample">
and provide style details in css - 并在CSS中提供样式详细信息-
.sample {
font-weight: bold;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.