Create a Weather forecast Details From HTML & CSS With Javascript Code
HTML Code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Weather Forecast</title>
<link rel="stylesheet" href="css/style1.css">
</head>
<body>
<div id="container">
<div id="location">
<input type="text" id="country" placeholder="Country">
<input type="text" id="state" placeholder="State">
<input type="text" id="city" placeholder="City">
<input type="submit" id="check" value="Check">
</div>
<img src="assets/clouds.svg" alt="" id="tempIcon">
<h2 id="weatherCountry">India/New Delhi</h2>
<h2 id="temperature">18°<b>C</b></h2>
<h2 id="weatherDescription">Smooke</h2>
<ul>
<li id="feelsLike">Feels Like 44°C</li>
<li id="humidity">Humidity 77</li>
<li id="longitude">Longitude 45.33</li>
<li id="latitude">Latitude 17.67</li>
</ul>
</div>
<script src="js/main1.js"></script>
</body>
</html>
CSS Code
* {
padding: 0;
margin: 0;
font-family: sans-serif;
box-sizing: border-box;
background: url(https://cdn.hipwallpaper.com/i/76/90/nHh8XJ.jpg) no-repeat center center fixed;
}
#container {
height: 100vh;
width: 100%;
position: relative;
background: transparent;
}
#container #location {
height: 60px;
width: 100%;
position: absolute;
left: 0;
top: 6%;
display: flex;
justify-content: center;
flex-direction: row;
}
#container input {
height: 50px;
width: 300px;
margin: 0px 20px;
padding: 0 20px;
border: 1px solid #fff;
outline: none;
background: transparent;
font-size: 20px;
border-radius: 25px 10px;
color: #fff;
}
#container input::placeholder {
color: red;
}
#container input[type="submit"] {
cursor: pointer;
width: 150px;
background: #fff00f;
color: blue;
font-weight: 700;
font-size: 22px;
}
#tempIcon {
height: 300px;
width: 300px;
position: absolute;
top: 27%;
right: 20%;
}
#weatherCountry {
font-size: 40px;
position: absolute;
top: 40%;
left: 15%;
color : green
}
#temperature {
font-size: 45px;
position: absolute;
bottom: 35%;
left: 43%;
color : yellow
}
#temperature b {
color: yellow;
}
#weatherDescription {
font-size: 30px;
position: absolute;
bottom: 23%;
left: 43%;
color : yellow;
}
#container ul {
position: absolute;
bottom: 3%;
left: 3%;
color : red;
}
#container ul li {
font-size: 22px;
margin: 20px 0;
}
43 Comments
Very interesting
ReplyDelete👌👌
DeletePerfect 👌
ReplyDeletePerfect 👌
ReplyDeletePerfect 👌
ReplyDeletePerfect 👌
ReplyDeleteExcellent
ReplyDeleteExcellent
ReplyDeleteExcellent
ReplyDeleteExcellent
ReplyDeleteExcellent
ReplyDeleteSuperb
ReplyDeleteExcellent
ReplyDeleteExcellent
ReplyDeleteExcellent
ReplyDeleteAwesome
ReplyDeleteAwesome
ReplyDeleteAwesome
ReplyDeletefantastic
ReplyDeletefantastic
ReplyDeletefantastic
ReplyDeletefantastic
ReplyDeletefantastic work
ReplyDeletebrilliant
ReplyDeletebrilliant
ReplyDeletebrilliant
ReplyDeletebrilliant
ReplyDeletefabulous
ReplyDeletefabulous
ReplyDeletefabulous
ReplyDeleteAmazing
ReplyDeleteAmazing
ReplyDeleteAmazing
ReplyDeleteWow Wonderful
ReplyDeleteWow Wonderful
ReplyDeleteWow Wonderful
ReplyDeleteWow Interesting
ReplyDeleteWow Interesting
ReplyDeleteFabulous
ReplyDeleteFabulous
ReplyDeleteFabulous
ReplyDeleteFabulous
ReplyDeleteKallu very nice
ReplyDelete