Untitled
3 years ago in Plain Text
<!-- Created by visph -->
<!-- Created by ¿ ?-->
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="shortcut icon" type="image/jpg" href="favicon.ico"/>
<style media="screen">
* {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Old versions of Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome, Edge, Opera and Firefox */
}
body{
margin: 0;
padding: 0;
font-family: sans-serif;
background-image: url(bg2.jpg);
background-size: cover;
font-size:4vmin;
}
.box{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 75%;
// height: 65%;
padding: 6vmin; //6%;
background: rgba(0, 0, 0, 0.6);
box-sizing: border-box;
box-shadow: 0 4vmin 6vmin /*15px 25px*/ rgba(0, 0, 0, 0.5);
border-radius: 2vmin; //10px;
}
.box h2{
margin: 0 0 8vmin; //30px;
padding: 0px;
color: #fff;
text-align: center;
}
.box .input-box{
position: relative;
//outline:2px solid yellow;
}
.box .input-box input{
width: 100%;
padding: .5em 0; //10px 0px;
font-size: 4vmin; //16px;
color: #fff;
letter-spacing: 1px;
margin-bottom: 1em; //10%;
border: none;
outline: none;
background: transparent;
border-bottom: 1px solid #fff;
//outline:2px solid lime;
}
.box .input-box label{
position: absolute;
top: 0;
left: 0;
letter-spacing: 1px;
padding: 2vmin 0; //10px 0px;
font-size: 4vmin; //16px;
color: #fff;
transition: .5s;
//outline:2px solid red;
}
.box .input-box input:focus ~ label,
/* .box .input-box input:valid ~ label{
*/
.box .input-box input.not-empty ~ label{
top: -4vmin; //-18px;
left: 0px;
color: #03a9f4;
font-size: 3vmin; //12px;
}
.box input[type="submit"]{
background: transparent;
border: none;
outline: none;
color: #fff;
background: #227be3;
padding: 2vmin 5vmin; //10px 20px;
border-radius: 1vmin; //5px;
cursor:pointer;
font-size:inherit;
}
.box input[type="submit"]:hover{
background-color: #3067b9;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<!-- what is supposed this script to do, as you don't have any <p> elements in your code?
<script>
$(document).ready(function(){
$("box").click(function(){
$("p").slideToggle();
});
});
</script>
-->
<title>Document</title>
</head>
<body>
<div class="box">
<h2>Login</h2>
<form action="config.php">
<div class="input-box">
<input type="text" name="username" autocomplete="off" required>
<label for="">Username</label>
</div>
<div class="input-box">
<input type="email" name="email" autocomplete="off" required>
<label for="">Email</label>
</div>
<div class="input-box">
<input type="password" name="password" autocomplete="off" required>
<label for="">Password</label>
</div>
<input type="submit" value="Save">
</form>
</div>
<script>
// this script set classes on inputs, according to empty or not field
$('input').blur(function(){
tmpval = $(this).val();
if(tmpval == '') {
$(this).addClass('empty');
$(this).removeClass('not-empty');
}
else {
$(this).addClass('not-empty');
$(this).removeClass('empty');
}
});
</script>
</body>
</html>