Animated Form Focus

Size
2,968 Kb
Views
14,168

How do I make an animated form focus?

Use a scale() animation on :focus to get users' attention as they complete form fields.. What is a animated form focus? How do you make a animated form focus? This script and codes were developed by James Steinbach on 05 November 2022, Saturday.

Animated Form Focus Previews

Animated Form Focus - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Animated Form Focus</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <form action="" class="test-form"> <label for="name">Name</label> <input type="text" id="name" /> <label for="email">Email Address</label> <input type="email" id="email" /> <label for="subject">Subject Line</label> <input type="text" id="subject" /> <label for="message">Message</label> <textarea name="message" id="message" cols="30" rows="7"></textarea> <input type="submit" value="Send Message" /> </form>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>

Animated Form Focus - Script Codes CSS Codes

* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
}
html { height: 100%;
}
body { height: 100%; background-size: 100% 100%; font-family: Gotham, Proxima Nova, Avenir Next, Avenir, Helvetica Neue, Helvetica, sans-serif; color: #47BA73;
}
.test-form { background: white; width: 20em; margin: 1em auto; padding: 1em; font-size: 1.5em; box-shadow: 0 0.5em 1em 0 #2C3E50;
}
label { color: #47BA73;
}
input,
textarea { width: 99%; display: block; padding: .25em; margin-bottom: 2em; outline-color: #47BA73; font-family: inherit; font-size: inherit; color: #2C3E50; background: white; box-shadow: none; border: #16B5D8 2px solid; -webkit-appearance: none;
}
input:focus,
textarea:focus { outline: none; box-shadow: 0 0 0.5em 0 #47BA73; border-color: #2C3E50; -webkit-animation: activate 0.5s; -moz-animation: activate 0.5s; animation: activate 0.5s;
}
input[type=submit] { width: auto; margin-left: auto; margin-right: auto; background: white; color: #47BA73; border: 2px solid #47BA73; padding-left: 1em; padding-right: 1em;
}
input[type=submit]:hover { background: rgba(71, 186, 115, 0.25);
}
@-webkit-keyframes activate { 0%, 100% { -webkit-transform: scale(1); } 50% { -webkit-transform: scale(1.1); }
}
@-moz-keyframes activate { 0%, 100% { -moz-transform: scale(1); } 50% { -moz-transform: scale(1.1); }
}
@keyframes activate { 0%, 100% { -webkit-transform: scale(1); -moz-transform: scale(1); -ms-transform: scale(1); -o-transform: scale(1); transform: scale(1); } 50% { -webkit-transform: scale(1.1); -moz-transform: scale(1.1); -ms-transform: scale(1.1); -o-transform: scale(1.1); transform: scale(1.1); }
}
Animated Form Focus - Script Codes
Animated Form Focus - Script Codes
Home Page Home
Developer James Steinbach
Username jdsteinbach
Uploaded November 05, 2022
Rating 3
Size 2,968 Kb
Views 14,168
Do you need developer help for Animated Form Focus?

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!

James Steinbach (jdsteinbach) Script Codes
Create amazing sales emails with AI!

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!