簡體   English   中英

在simpleweather.js中將大寫更改為小寫

[英]Changing uppercase to lowercase in simpleweather.js

這對我很挑剔,但我想將當前天氣狀況的大寫字母更改為小寫。 大部分多雲至大部分多雲。 另外,我將如何設置文字樣式? 我以前從未在jQuery中使用過html。

html = '<span> It is currently ' + weather.currently + ' and </span>';

http://codepen.io/anon/pen/eNwzJp

http://simpleweatherjs.com/

只需使用

weather.currently.toLowerCase()

對於樣式,您可以將類添加到span標簽

<span class="sample">

並在CSS中提供樣式詳細信息-

.sample {
  font-weight: bold;
}

有一個javascript方法toLowerCase()和toUpperCase()解決您的問題。 參考在這里

這樣:

weather.currently.toLowerCase()

對於樣式,您可以檢查此網站

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM