Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHONE SPECS WEBSITE USING SLIDE BUTTON #464

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions phone specs website/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<html>
<head>
<title>wesbite </title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="main">
<nav>
<div class="logo">
<img src="https://imgur.com/uhAWy8k">
</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="https://imgur.com/jBBPiwT" class="mobile">
<div id="circle">
<div class="feature one ">
<img src="https://imgur.com/Q494Vfr">
<div>
<h1>Camera</h1>
<p>12MP,Wide Angle Lens</p>
</div>
</div>
<div class="feature two">
<img src="https://imgur.com/EQITAuW">
<div>
<h1>Processor</h1>
<p>SnapDragon 785</p>
</div>
</div>
<div class="feature three">
<img src="https://imgur.com/uOskqtL">
<div>
<h1>Display</h1>
<p>SAMOLED 120Hz</p>
</div>
</div>
<div class="feature four">
<img src="https://imgur.com/yAHDxzC">
<div>
<h1>Battery</h1>
<p>8000mAh</p>
</div>
</div>
</div>
</div>
<div class="controls">
<img src="https://imgur.com/64NJM5G" id="upbtn">
<h3>Features</h3>
<img src="https://imgur.com/64NJM5G" 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>
</html>
148 changes: 148 additions & 0 deletions phone specs website/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
*{
margin:0;
padding:0;
font-family:sans-serif;
}

.main
{
width:100%;
height:100vh;
position:relative;
overflow:hidden;
background-image: linear-gradient(to right,#9c27b0,#8ecdff);

}

nav
{
width:80%;
position:sticky;
margin:20px auto;
z-index: 1;
}
.logo{
flex-basis: 20%;

}
.logo image{
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:absolute;
top:50%;
left:-10%;
transform: translateY(-50%);
}

#circle{
width:1000px;
height:1000px;
position:absolute;
top:0;
left:0;
border-radius: 50%;
transform:rotate(0deg) ;
transition: 1s;
}

.feature img{
width:70px;

}
.feature{
position:absolute;
display:flex;
color:white;
}
.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:350px;
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:10%;
top:50%;
transform: translateY(-50%);
text-align: center;
}
.controls h3{
margin:15px 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;
left:0;
right:0;
}