Brick Breaker
How do I make an brick breaker?
Work in progress.... What is a brick breaker? How do you make a brick breaker? This script and codes were developed by Jeff Scott Ward on 28 August 2022, Sunday.
Brick Breaker - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Brick Breaker</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ @keyframes fall { 0% { opacity: 1; transform: translateY(0); display: block; } 100% { opacity: 0; transform: translateY(100px); display: none; }
}
.bricks { list-style: none;
}
.bricks .brick { position: relative; top: 0; background: #04BFBF; width: 60px; height: 20px; display: inline-block; border-radius: 5px; box-shadow: inset 0px 0px 20px black;
}
.bricks .brick:hover { cursor: pointer;
}
.bricks .brick.fall { animation: fall 0.8s ease-in-out 1; animation-direction: normal; animation-fill-mode: forwards;
}
#ball { width: 10px; height: 10px; background: black; border-radius: 50%; position: absolute; bottom: 10%; left: 50%; margin-left: -5px;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body>
<ul class="bricks"> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li> <li class="brick"></li>
</ul>
<div id="ball"></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Brick Breaker - Script Codes CSS Codes
@keyframes fall { 0% { opacity: 1; transform: translateY(0); display: block; } 100% { opacity: 0; transform: translateY(100px); display: none; }
}
.bricks { list-style: none;
}
.bricks .brick { position: relative; top: 0; background: #04BFBF; width: 60px; height: 20px; display: inline-block; border-radius: 5px; box-shadow: inset 0px 0px 20px black;
}
.bricks .brick:hover { cursor: pointer;
}
.bricks .brick.fall { animation: fall 0.8s ease-in-out 1; animation-direction: normal; animation-fill-mode: forwards;
}
#ball { width: 10px; height: 10px; background: black; border-radius: 50%; position: absolute; bottom: 10%; left: 50%; margin-left: -5px;
}
Brick Breaker - Script Codes JS Codes
(function() { var collides; $(function() { return $('.brick').click(function() { $(this).addClass('fall'); return $('.brick').index([Math.random * 10]).addClass('fall'); }); }); collides = function(a, b) { return a.x < b.x + b.width && a.x + a.width > b.x && a.y < b.y + b.height && a.y + a.height > b.y; };
}).call(this);
Developer | Jeff Scott Ward |
Username | jeffscottward |
Uploaded | August 28, 2022 |
Rating | 3 |
Size | 3,547 Kb |
Views | 87,032 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
3D Hexagon Text Roller | 2,289 Kb |
Panning Wall Tiles | 2,822 Kb |
Impress JS Algorhytmic Generator | 7,906 Kb |
Trader Phone APP UI | 6,799 Kb |
Sprite Animation | 2,669 Kb |
Iso-Metric Snake | 5,511 Kb |
Lab 49 Logo Animated | 3,749 Kb |
Pure CSS Responsive Slider | 5,404 Kb |
Object Oriented SASS Framework | 8,564 Kb |
Brick Breaker | 3,547 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Cant get enough icecream in pure css3 | Melawire | 4,322 Kb |
Progressively reveal dots on a Bezier curve | GreenSock | 2,489 Kb |
SnappySnippet Test | Elmsoftware | 8,385 Kb |
3D flipping card | Ssaakkaa | 2,238 Kb |
LAMP PURE CSS with Animation | Dam62500 | 2,911 Kb |
Blog Concept - Single Post | Marionebl | 9,603 Kb |
Mega menu | DimaZubkov | 5,066 Kb |
Modal Dialog | Gigaleet | 2,251 Kb |
Pure CSS Animated Photo Stack | Depthdev | 2,486 Kb |
Stylize Stories | Jvhti | 2,465 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!