var days = ["星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期天"];;
var weather = ["大晴天", "晴天", "少云", "多云", "雨天", "下雪", "暴风雨", "迷雾", ];var maxTemp = 110;
var minTemp = 32 ;
function generateWeather()
{
var weatherToday;
var tempToday;
for (var i = 0; i < days.length; i++)
{
weatherToday = weather[Math.floor(Math.random() * weather.length)];
tempToday = Math.floor(Math.random() * (maxTemp - minTemp) + minTemp);
dailyTemp[i] = tempTodaytoday;
document.getElementById("5天的天气").innerHTML += "<div id='" + days[i] + "'class='" + weatherToday + "'><b>Forecast for " + days[i] + ":</b><br><br>"+ weatherToday + " and " + tempTaday + " degrees.</div>";
}
}
html,
body {
width: 100%;
height: 100%;
}
body {
background-color: #e9631a;
}
.flex-container {
width: 100%;
height: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.flex-unit {
text-align: center;
}
h1 {
font-family: sans-serif;
console