Random-background generator
How do I make an random-background generator?
What is a random-background generator? How do you make a random-background generator? This script and codes were developed by Alejandro Zuniga on 02 January 2023, Monday.
Random-background generator - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>random-background generator</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <!-- index.html -->
<!-- Random Backround -->
<body class="bg1">
</body> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Random-background generator - Script Codes CSS Codes
/* Presentation*/
.bg0 { background: url("https://s-media-cache-ak0.pinimg.com/originals/11/6b/de/116bde934197b8261112964b669a8ece.jpg"); max-width: 20%; max-height: auto;
}
.bg1 { background: url(http://people.oregonstate.edu/~petschec/PNWNT/forestmist.jpg); max-width: 20%; max-height: auto;
}
.bg2 { background: url(http://media.oregonlive.com/travel_impact/photo/misty-fjordsjpg-d8b3995379cb4108.jpg); max-width: 20%; max-height: auto;
}
Random-background generator - Script Codes JS Codes
// scripts.js
// Random Number Generator
var maxRand = 3;
var randNum = Math.floor( Math.random() * maxRand );
console.log(randNum);
// Get Body, Change Class to 'gb0', 'bg1', or 'bg2'
$('body').addClass( 'bg' + randNum );
![Random-background generator - Script Codes](http://shots.codepen.io/azuniga5/pen/ZKqBNG-512.jpg)
Developer | Alejandro Zuniga |
Username | azuniga5 |
Uploaded | January 02, 2023 |
Rating | 3 |
Size | 2,353 Kb |
Views | 24,288 |
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 |
Internal CSS page 2 | 1,373 Kb |
WebKit Animation | 1,735 Kb |
Portfolio | 1,852 Kb |
Zebra striping | 1,472 Kb |
A Pen by alejandro zuniga | 1,620 Kb |
Webkit | 1,370 Kb |
Thumbnail | 2,350 Kb |
Swoop Photshop web | 2,213 Kb |
Lab Challenge | 2,217 Kb |
Contact | 1,895 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 |
Caputre Cam with JS | KimmoCommit | 2,795 Kb |
Local Weather App - FreeCodeCamp | TrevorWelch | 4,134 Kb |
Fluid Layout with Float | Jxqr97 | 1,785 Kb |
Prototype Responsive Homepage | Heyitsolivia | 7,677 Kb |
Starting out with Ember.JS | Cfleschhut | 4,808 Kb |
Matrix | Stathisnikolaidis | 1,922 Kb |
Wip elementary os navbar | Nickcolley | 2,993 Kb |
SVG Icons Template | Legofsalmon | 2,618 Kb |
No Vacancy 404 CSS Only | Sethkontny | 0 Kb |
Count up | Alanshortis | 2,391 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!