JSFiddle - React, Tailwind, and code Playground
HTML
<input id="frontloginform" placeholder=" введите логин" type="text" required autocomplete="off"/>
CSS
.flippedform{
-webkit-transform: rotate3d(1,0,0,-60deg);
-moz-transform: rotate3d(1,0,0,-60deg);
-ms-transform: rotate3d(1,0,0,-60deg);
-o-transform: rotate3d(1,0,0,-60deg);
transform: rotate3d(1,0,0,-60deg);
}
JavaScript
jQuery(function($) {
// Действия после загрузки страницы
$(function(){
$("#frontloginform").focus();
});
$(function() {
var login = $("input[id='frontloginform']");
login.keyup(function(){
if (login.val().length>=3 && login.is(":focus")) {
$(function(){
$("#frontloginform").keydown(function(e) {
if (e.which == 13){
flipform();
}
else if (e.which == 9){
flipform();
}
});
});
}
else{
$("#enter").css("display", "none");
}
});
});
function flipform(){
$("#frontloginform").toggleClass("flippedform");
};
});