Fun form with currentColor
How do I make an fun form with currentcolor?
Trying to have fun with currentColor. Just change the css' global color set at line 4. Hurrah !. What is a fun form with currentcolor? How do you make a fun form with currentcolor? This script and codes were developed by Benjamin Réthoré on 05 January 2023, Thursday.
Fun form with currentColor - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Fun form with currentColor</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <form action=""> <legend>Subscribe</legend> <input type="text" placeholder="Your email"/> <input type="text" placeholder="First name"/> <button type="button"> <span class="button__content">Submit</span> </button>
</form> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Fun form with currentColor - Script Codes CSS Codes
* { -webkit-box-sizing: border-box; box-sizing: border-box;
}
body { font-family: 'Open Sans', 'Helvetica Neue', HelveticaNeue, Arial, sans-serif; font-size: 16px; line-height: 1.48; text-align: center; color: #2980b9;
}
form { position: relative; width: 300px; margin: 2em auto; padding: 3em 2em 2em; border: 1px solid currentColor; text-align: center; color: currentColor;
}
legend { position: absolute; top: -.75em; left: 2em; right: 2em; background: #fff; text-transform: uppercase; font-size: 1.1em; font-weight: 600;
}
input { color: currentColor; font-size: .9em; display: block; width: 100%; margin-bottom: 1em; padding: .75em 1em; border: 1px solid; -webkit-transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1); transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1);
}
input:focus { outline: 0; -webkit-transform: scale(1.05); -moz-transform: scale(1.05)
}
button { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding: .75em 1em; border: 1px solid; color: currentColor; background: currentColor; font-size: 1em; display: block; width: 100%; cursor: pointer; font-weight: 100; -webkit-transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1); transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1);
}
.button__content { color: #ffffff; opacity: 1;
}
.button.is-submitted .button__content { color: #fff: }
button:hover { background: transparent; } button:hover .button__content { color: currentColor; }
button:focus { outline: 0; background: transparent;
} button:focus .button__content { color: currentColor; }
button:active,
button.is-submitted,
button.is-submitted:hover,
button.is-submitted:active { background: #27ae60; border-color: #27ae60; outline: 0;
} button:active .button__content, button.is-submitted .button__content, button.is-submitted:hover .button__content, button.is-submitted:active .button__content { color: #fff; }
::-webkit-input-placeholder { color: currentColor; }
:-moz-placeholder { color: currentColor; }
::-moz-placeholder { color: currentColor; }
:-ms-input-placeholder { color: currentColor; }
a { display: inline-block; margin: 0; color: #777; text-decoration: none; padding: 1em 2em; background: #e2e2e2; box-shadow: 0 2px 0 0 #ccc;
}
Fun form with currentColor - Script Codes JS Codes
// JUST FOR THE DEMO, change the color
$('button').on('click', function(event){ event.preventDefault(); $(this) .blur() .addClass('is-submitted') .find('.button__content') .text('Thanks');
});
var i = 0;
var colors = [ "#f39c12", "#16a085", "#27ae60", "#2980b9", "#8e44ad", "#2c3e50", "#c0392b", "#d35400"
];
setTimeout(function(){ if (i >= colors.length) { i = 0; } $('body').css('color', colors[i]); i+=1;
}, 1000);
Developer | Benjamin Réthoré |
Username | bnthor |
Uploaded | January 05, 2023 |
Rating | 3 |
Size | 2,713 Kb |
Views | 6,072 |
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 |
Responsive height typographic menu | 2,549 Kb |
Sample scss map | 2,451 Kb |
Cookie policy popunder | 3,743 Kb |
Simple tooltips | 2,810 Kb |
CSS Grid gallery | 2,311 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 |
Popover Example | Seanboom | 2,429 Kb |
A Pen by tugce | Ecgutcnkr | 4,197 Kb |
Price | Catcode | 2,623 Kb |
Minimal Material Design Form Input | Koenigsegg1 | 3,076 Kb |
CSS Hover Effects | Alen | 3,613 Kb |
Twitch TV | Natester13 | 4,488 Kb |
Simple yet functional | Matheusxaviersi | 2,025 Kb |
Lunar eclipse | Ademilter | 2,056 Kb |
Highbrow Basic HTML Lesson 8 | Kimlarocca | 2,094 Kb |
Navcube | Wbarlow | 4,775 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!