Button state test
How do I make an button state test?
Http://googlesamples.github.io/web-fundamentals/samples/input/touch/states-example.html. What is a button state test? How do you make a button state test? This script and codes were developed by Tomoyuki Kashiro on 19 January 2023, Thursday.
Button state test - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>button state test</title> <meta name="viewport" content="width=device-width,initial-scale=1"> <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> <h1>button state test</h1>
<ul class="desc"> <li style="color: blue">:normal</li> <li style="color: red">:hover</li> <li style="color: green">:focus</li> <li style="color: gray">:active</li>
</ul>
<button class="btn" tabindex="1">Button 1</button>
<button class="btn hover" tabindex="2">Button 2</button>
<button class="btn active" tabindex="3">Button 3</button>
<button class="btn focus" tabindex="4">Button 4</button> <script src="js/index.js"></script>
</body>
</html>
Button state test - Script Codes CSS Codes
body { background-color: #d3e2fc; margin: 32px; font-family: 'Roboto', sans-serif; color: #ecf0f1;
}
h1 { font-size: 3rem; color: #999; margin-bottom: 30px;
}
.desc { margin-bottom: 30px;
}
.desc li { display: inline;
}
a { color: #ecf0f1;
}
button { display: block; width: 100%; max-width: 400px; padding: 16px; margin: 0 auto 16px auto; box-sizing: border-box; border-style: none; border-radius: 6px; color: inherit; font-family: inherit; font-size: inherit; text-align: center; text-decoration: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none;
}
.btn { background-color: blue;
}
.btn:hover { background-color: red;
}
.btn:focus { background-color: green; /* The outline parameter surpresses the border color / outline when focused */ outline: 0;
}
.btn:active { background-color: gray;
}
/* Webkit / Chrome Specific CSS to remove tap highlight color */
.btn { -webkit-tap-highlight-color: transparent;
}
/* Firefox Specific CSS to remove button differences and focus ring */
.btn { background-image: none;
}
.btn::-moz-focus-inner { border: 0;
}
Button state test - Script Codes JS Codes
window.onload = function() { if(/iP(hone|ad)/.test(window.navigator.userAgent)) { document.body.addEventListener('touchstart', function() {}, false); }
}
Developer | Tomoyuki Kashiro |
Username | Tkashiro |
Uploaded | January 19, 2023 |
Rating | 3 |
Size | 2,954 Kb |
Views | 10,120 |
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 |
Page transition | 2,767 Kb |
3 lines menu button | 3,564 Kb |
Media Fragments URI | 1,753 Kb |
Simple arc animation | 4,136 Kb |
CSS Slideshow | 2,721 Kb |
Simple sort algorithm in JavaScrip | 1,673 Kb |
Responsive image srcset | 3,093 Kb |
CSS Animation Sample | 2,896 Kb |
Shadow Dom Test | 2,204 Kb |
Manage Async Animation by using jQuery.DeferredPipeline | 4,751 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 |
Pure CSS Read More Arrow | Zephyr | 1,747 Kb |
AOR site logo | Thatbram | 2,527 Kb |
Css3 slide | Nakome | 3,190 Kb |
Animated SVG stroke-dasharray | Netsi1964 | 3,179 Kb |
Rrremark.com Overlay Highlighter | Derickruiz | 4,438 Kb |
JQuery AJAX reddit Exercise | Btholt | 1,777 Kb |
SCSS Unit Conversion | Jakob-e | 8,210 Kb |
React TODO | Enieste | 3,320 Kb |
Border-radius animation | Yukulele | 2,480 Kb |
Polygon Logo in CSS | Kai | 3,412 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!