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

Add files via upload #439

Open
wants to merge 1 commit 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
Binary file added car_body.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added car_wheel_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added car_wheel_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hehe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
var audio = document.createElement('audio');
audio.setAttribute('src','sound.mp3');
audio.loop=true;
audio.play();
Binary file added sound.mp3
Binary file not shown.
23 changes: 23 additions & 0 deletions sourcecode.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>racing car</title>
<link rel="stylesheet" href="style.css">

<script src="index.js"></script>
</head>
<body>
<div class="container">
<div class="sky"> </div>
<!-- <div id="track"> -->
<div id="car">
<div class="wheel1"></div>
<div class="wheel2"></div>
</div>
</div>
</div>
</body>
</html>
312 changes: 90 additions & 222 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,223 +1,91 @@
*{
padding: 0;
margin:0; box-sizing: border-box;
}

body{
scroll-behavior: smooth;
overflow-x: hidden;
}
header{
width: 100vw;
height:90vh;
background:linear-gradient(rgba(0,0,0,0.8),rgba(0,0,0,0.8));
background-size: cover;
background-position:;
position: relative;
background-attachment: fixed;
}
nav{
width: 100%;
height:80px;
background: white;
color: black;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0px 80px;
position:fixed;
top:0;
background:white;
z-index: 1;
border-bottom: 1px solid rgba(0,0,0,0.2);
}
.logo{
font-family: sans-serif;
font-size:2.5em;
}
.logo span{
color: #e74c3c;
}
.menu a{
text-decoration: none;
color: black;
font-size:20px;

padding: 10px 20px;
font-family: sans-serif;

}
.menu a:first-child{
color:#e74c3c;
}
.menu a:hover{
color: #e74c3c;
transition: 0.4s;
}
.icon i{
font-size:20px;
}
.icon i:hover{
color: #e74c3c;
}
.icon a{
padding:10px 20px;
background:#e74c3c;
color:white;
text-decoration: none;
margin-left:30px;
border-radius: 5px;
}
.icon a:hover{
background: transparent;
border:1px solid #e74c3c;
color: black;
transition: 0.4s ease;
}
.h-text{
max-width: 700px;
position: absolute;
top:50%;
left: 50%;
transform: translate(-50%,-50%);
color: white;
text-align: center;
}

.h-text h1{
font-family: sans-serif;
font-size: 3em;
line-height:1.5em;
}
.h-text input{
width: 60%;
padding: 20px;
border-radius: 8px;
font-size: 20px;
border:none;
outline: none;
}
.h-text button{
width: 30%;
padding:20px;
background: #e74c3c;
font-size: 20px;
border:none;
outline: none;
color: white;
border-radius: 8px;
margin-top: 30px;
}


.filter-gallery{
padding:100px;

}


.portfolio-menu{
text-align: center;
margin-bottom: 20px;
}
.portfolio-menu ul li{
list-style: none;
display: inline-block;
margin:20px 0px;
font-size: 20px;
font-weight: bold;
font-family: sans-serif;
padding: 10px 20px;
cursor: pointer;
transition: 0.5s ease;
text-align: center;


}
.portfolio-menu ul li:hover{
background: #e74c3c;
color: white;
border-radius: 8px;
}
li.active{
background:#e74c3c;
color: white;
border-radius: 8px;
}
.portfolio-item{
width: 100%;
}
.portfolio-item .item{
width:360px ;
height:360px;
float: left;
margin-bottom:20px;
margin-right: 20px;
}
.portfolio-item .item img{
width: 100%;
height: 100%;
border-radius: 8px;
}



footer{
background: #262626;
color: white;
width: 100%;

padding: 50px 100px;

}

.f-contact p ul{
text-align: center;
align-items: right;
}
.f-contact{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-top:3em;
border-bottom: 1px solid rgba(255,255,255,0.2);
padding: 20, 50;
}
.f-contact>div{
flex-basis:20%;


}
.f-contact p{
line-height:2em;
font-size: 20px;
color: grey;
cursor: pointer;
}
.f-contact p:hover{
color: white;
}
.f-contact i{
background: white;
color: black;
padding:10px;
font-size:16px;
margin: 20px 5px;
border-radius: 50%;
transition: .4s ease;
}
.f-contact i:hover{
background: transparent;
border:1px solid white;
color: white;
}
footer{
text-align: ;
text-orientation: upright;
align-items: right;
flex-basis: 1;
}
ul#horizontal-list{

*{
margin:0;
padding:0;
box-sizing: border-box;
}
body {
overflow-y: hidden; /* Hide vertical scrollbar */
overflow-x: hidden; /* Hide horizontal scrollbar */
}
.sky{

height:100vh;
width: 100%;
background-image: url(hehe.png);
background-size :cover;
/* for full screen image */
position:absolute;
background-repeat: no-repeat;
}
#car{
background-image: url(car_body.png) ;
background-repeat: no-repeat;
height: 4em;
width: 14em;
background-size: cover;
animation: shake linear .2s infinite;
position: absolute;
animation: carMove linear 10s infinite;
margin-top: 30%;
}
.wheel1{
background-image: url(car_wheel_left.png);
background-size: cover;
height: 2.5em;
width: 2.5em;
margin-left: 1.8em;
position: relative;
position: relative;
top: 1.60em;

animation: wheelRotation linear .6s infinite;
}
.wheel2{
background-image: url(car_wheel_right.png);
background-size: cover;
height: 3em;
width: 3em;
position: relative;
bottom: 1.03em;
margin-left: 8.8em;
animation: wheelRotation linear .6s infinite;
}

@keyframes wheelRotation
{
100%{
transform: rotate(360deg);
}
}

@keyframes carMove
{
100%{
transform: translateX(200vw);
}
}

@keyframes shake
{
0%{
transform: translateY(-5px);
}
50%{
transform: translateY(5px);
}
100%{
transform: translateY(-5px);
}
}
@keyframes shakebody
{
0%{
transform: translateY(-50px);
}
50%{
transform: translateY(50px);
}
100%{
transform: translateY(-50px);
}
}
Binary file added track.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.