Button style
How do I make an button style?
Using spin.js by fgnass: https://github.com/fgnass/spin.js. What is a button style? How do you make a button style? This script and codes were developed by Hampus Persson on 13 September 2022, Tuesday.
Button style - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Button style</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <section> <button class="Button"> <span class="Button-label">BUTTON</span> </button> <button class="Button js-spinnerButton"> <span class="Button-spinner"></span> <span class="Button-label">SPINNER</span> </button>
</section> <script src='https://fgnass.github.io/spin.js/spin.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Button style - Script Codes CSS Codes
body { background-color: #2ecc71;
}
section { padding-top: 40px; text-align: center;
}
.Button { display: inline-block; position: relative; margin: 15px 30px; padding: 25px 80px; background: #333; color: #fff; box-shadow: 0 4px #111; border: none; cursor: pointer; text-transform: uppercase; letter-spacing: 2px; font-size: 14px; font-weight: 700; outline: none; -webkit-transition: none; transition: none;
}
.Button:hover { background: #2b2b2b;
}
.Button:active { background: #2b2b2b; box-shadow: 0 0px #111; top: 4px;
}
.Button-spinner { opacity: 0;
}
.Button-spinner.is-visible { opacity: 1;
}
Button style - Script Codes JS Codes
var button = document.querySelector('.js-spinnerButton');
button.addEventListener('click', function(e) { var spinner = this.querySelector('.Button-spinner'); new Spinner({color:'#fff', length: 4, width: 2, radius: 4, lines: 12, left: '50px'}).spin(spinner); spinner.classList.add('is-visible'); setTimeout(function() { spinner.classList.remove('is-visible'); },3000)
});
Developer | Hampus Persson |
Username | hmps |
Uploaded | September 13, 2022 |
Rating | 3 |
Size | 2,644 Kb |
Views | 22,264 |
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 |
Test for pseudo element animation | 3,306 Kb |
Slider | 4,088 Kb |
Pure CSS GitHub ribbon | 3,395 Kb |
Drag and drop editor | 3,422 Kb |
Badge animation | 2,732 Kb |
FlowText.js | 3,728 Kb |
Filter list | 3,517 Kb |
Z-level shadows | 2,311 Kb |
JSCSS | 3,963 Kb |
Pretty inputs | 2,773 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 |
Console fun | Dviate | 1,500 Kb |
Angular Route | Arun_v606 | 1,837 Kb |
A Pen by Moeid Saleem | Moeidsaleem | 1,862 Kb |
Out of the blue | Giaco | 2,537 Kb |
Yuliya v krylova | Rafszul | 37,351 Kb |
Layout 11 | Altynai | 1,690 Kb |
Compare resources on mobile sites | Gyusza | 3,226 Kb |
Lunar eclipse | Ademilter | 2,056 Kb |
Coburg Banks SVG Logo | Mjtweaver | 3,875 Kb |
Elon Musk - Tribute Page - FreeCodeCamp | Yunnimun | 8,615 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!