Adding mobile specification

pull/922/head
Brahmadutta02 3 years ago
parent 2066f9ac29
commit b2d5a7d349

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

@ -0,0 +1,84 @@
<!DOCTYPE html>
<html>
<head>
<title>Mobile Phone Specification</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="main">
<nav>
<div class="logo">
<img src="images/loogoo.png">
</div>
<div class="nav-links">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Phone</a></li>
<li><a href="#">Accessories</a></li>
<li><a href="#">Cart</a></li>
</ul>
</div>
</nav>
<div class="information">
<div class="overlay"></div>
<img src="images/mobile.png" class="mobile">
<div id="circle">
<div class="feature one">
<img src="images/camera.png">
<div>
<h1>Camera</h1>
<p>50MP, Ultra Wide-angle Lens, <br>2MP Macro Lens</p>
</div>
</div>
<div class="feature two">
<img src="images/processor.png">
<div>
<h1>Processor</h1>
<p>MediaTek Dimensity 920 5G Processor</p>
</div>
</div>
<div class="feature three">
<img src="images/display.png">
<div>
<h1>Display</h1>
<p>90Hz Super AMOLED Display <br> Screen size: 6.4"16.3cm</p>
</div>
</div>
<div class="feature four">
<img src="images/battery.png">
<div>
<h1>Battery</h1>
<p>60W SuperDart Charge</p>
</div>
</div>
</div>
<div class="controls">
<img src="images/arrow.png" id="upBtn">
<h3>Features</h3>
<img src="images/arrow.png" id="downBtn">
</div>
</div>
<script>
var circle = document.getElementById("circle");
var upBtn = document.getElementById("upBtn");
var downBtn = document.getElementById("downBtn");
var rotateValue = circle.style.transform
var rotateSum;
upBtn.onclick = function(){
rotateSum = rotateValue + "rotate(-90deg)";
circle.style.transform = rotateSum;
rotateValue = rotateSum;
}
downBtn.onclick = function(){
rotateSum = rotateValue + "rotate(90deg)";
circle.style.transform = rotateSum;
rotateValue = rotateSum;
}
</script>
</body>
</htmml>

@ -0,0 +1,129 @@
*{
margin: 0;
padding: 0;
font-family: sans-serif;
}
.main{
width: 100%;
height: 100vh;
position: relative;
overflow: hidden;
background: linear-gradient(to right, #000000fe, #fff701);
}
nav{
width: 80%;
position: sticky;
margin: 20px auto;
z-index: 1;
display: flex;
align-items: center;
}
.logo{
flex-basis: 20%;
}
.logo img{
width: 150px;
}
.nav-links{
flex: 1;
text-align: right;
}
.nav-links ul li{
list-style: none;
display: inline-block;
margin: 0 20px;
}
.nav-links ul li a{
color: #fff;
text-decoration: none;
}
.information{
width: 1000px;
height: 1000px;
position: fixed;
top: 50%;
left: -10%;
transform: translateY(-50%);
}
#circle{
width: 1000px;
height: 1000px;
position: absolute;
top: 0;
left: 0;
border-radius: 50%;
transform: 0deg;
transition: 1s;
}
.feature img{
width: 70px;;
}
.feature{
position: absolute;
display: flex;
color: #fff;
}
.feature div{
margin-left: 30px;
}
.feature div p{
margin-top: 8px;
}
.one{
top: 450px;
right: 50px;
}
.two{
top: 150px;
left: 350px;
transform: rotate(-90deg);
}
.three{
bottom: 450px;
left: 50px;
transform: rotate(-180deg);
}
.four{
bottom: 150px;
right: 350px;
transform: rotate(-270deg);
}
.mobile{
width: 200px;
position: absolute;
top: 50%;
left: 35%;
transform: translateY(-50%);
z-index: 1;
}
.controls{
position: absolute;
right: -40%;
top: 50%;
transform: translateY(-50%);
}
.controls h3{
margin: 20px 0;
color: #fff;
}
#upBtn{
width: 15px;
cursor: pointer;
}
#downBtn{
width: 15px;
cursor: pointer;
transform: rotate(180deg);
}
.overlay{
width: 0;
height: 0;
border-top: 500px solid #fff;
border-right: 500px solid transparent;
border-bottom: 500px solid #fff;
border-left: 500px solid #fff;
position: absolute;
left: 0;
top: 0;
}
Loading…
Cancel
Save