Saturday, 18 January 2020

CSS Observatory

CSS OBSERVATORY

image of output
IMAGE OF OUTPUT

HTML:
<html>
<head>
<title>NIGHT</title>
<link rel="stylesheet" href="night.css">
</head>
<body>
<div class="all">
<div class="tower1"></div>
<div class="tower2"></div>
<div class="mountain"></div>
<div class="cloud1"></div>
<div class="cloud2"></div>
<div class="cloud3"></div>
<div class="moon"></div>
</div>
</body>
</html>

CSS:
body {
background-color: #000000c9;
}
.all {
position: absolute;
top: 70%;
left: 50%;
transform: translate(-50%, -50%);
}
.tower1 {
width: 200px;
height: 100px;
position: relative;
background: linear-gradient(to right, #d8534a 0px 100px, #e6574d 100px 200px);
border-radius: 200px 200px 0 0;
z-index: 3;
}
.tower1:before {
content: " ";
position: absolute;
width: 220px;
height: 40px;
background-color: #df372a;
border-radius: 10px;
top: 95px;
left: -10px;
}
.tower1:after {
content: "";
position: absolute;
width: 25px;
height: 45px;
background: linear-gradient(to right, #a8221b 0px 10px, #b62820 10px 25px);
top: 195px;
left: 145px;
}
.tower2 {
position: relative;
width: 200px;
height: 140px;
background: linear-gradient(to right, #c93227 0px 100px, #d33529 100px 200px);
z-index: 2;
}
.tower2:before {
content: " ";
position: absolute;
width: 30px;
height: 30px;
background: orange;
left: 160px;
top: -90px;
transform: rotate(-40deg);
}
.tower2:after {
content: " ";
position: absolute;
width: 0px;
height: 40px;
/*border-left:15px solid blue;*/
border-right: 20px solid orange;
border-top: 13px solid transparent;
border-bottom: 13px solid transparent;
/*background: red;*/
transform: rotate(-40deg);
left: 180px;
top: -120px;
}
.mountain {
width: 0px;
height: 0px;
border-left: 220px solid transparent;
/*border-top:13px solid red;*/
border-right: 220px solid transparent;
border-bottom: 400px solid #e0e1e5;
position: absolute;
top: -160px;
}
.mountain:before {
content: " ";
width: 0px;
height: 0px;
border-left: 180px solid transparent;
/*border-top:13px solid red;*/
border-right: 180px solid transparent;
border-bottom: 260px solid #e0e1e5;
position: absolute;
top: 140px;
left: 50px;
opacity: 0.8;
}
.cloud1 {
content: "";
position: absolute;
width: 80px;
height: 40px;
border-radius: 80px 80px 0 0;
background: #e8eaf6;
top: -180px;
left: 15px;
}
.cloud1:before {
content: "";
position: absolute;
width: 120px;
height: 40px;
border-radius: 50px;
background: #d3e2f9;
position: absolute;
top: 25px;
left: -20px;
}
.cloud2 {
content: "";
position: absolute;
width: 80px;
height: 40px;
border-radius: 80px 80px 0 0;
background: #e8eaf6;
top: -115px;
left: 350px;
}
.cloud2:before {
content: "";
position: absolute;
width: 120px;
height: 40px;
border-radius: 50px;
background: #d3e2f9;
position: absolute;
top: 30px;
left: -35px;
}
.cloud3 {
content: "";
position: absolute;
width: 80px;
height: 40px;
border-radius: 80px 80px 0 0;
background: #e8eaf6;
top: -220px;
left: 470px;
}
.cloud3:before {
content: "";
position: absolute;
width: 120px;
height: 40px;
border-radius: 50px;
background: #d3e2f9;
position: absolute;
top: 30px;
left: -35px;
}
.moon {
width: 120px;
height: 90px;
border-radius: 120px;
border-left: 25px solid #4989f5;
position: absolute;
top: -250px;
left: 420px;
transform: rotate(-20deg);
}
view raw observatory.css hosted with ❤ by GitHub

OUTPUT:

SUBSCRIBE this BLOG for more such interesting Projects.

Share:

Related Posts:

1 comment: