This is a responsive mobile first popup modal login form using materialize css,
Created
August 24, 2018 04:35
-
-
Save TrueSlu/67b08fee402c70a6c8f97cc43548c45a to your computer and use it in GitHub Desktop.
Popup login form materialize css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
<div class="container center"> | |
<a href="#login" class="btn btn-large teal modal-trigger">Login</a> | |
</div> | |
<div id="login" class="modal "> | |
<h5 class="modal-close">✕</h5> | |
<div class="modal-content center"> | |
<h4>Login Form</h4> | |
<br> | |
<form action="#"> | |
<div class="input-field"> | |
<i class="material-icons prefix">person</i> | |
<input type="text" id="name"> | |
<label for="name">Username</label> | |
</div> | |
<br> | |
<div class="input-field"> | |
<i class="material-icons prefix">lock</i> | |
<input type="password" id="pass"> | |
<label for="pass">Password</label> | |
</div> | |
<br> | |
<div class="left" style="margin-left:20px;"> | |
<input type="checkbox" id="check"> | |
<label for="check">Remember Me</label> | |
</div> | |
<br> | |
<input type="submit" value="Login" class="btn btn-large"> | |
</form> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('.modal').modal(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{ | |
background:#EF9A9A; | |
} | |
a.btn{ | |
margin-top: 30%; | |
} | |
.modal{ | |
max-height:100%; | |
overflow:hidden; | |
} | |
input[type="submit"]{ | |
width: 100%; | |
margin-top: 50px; | |
} | |
.modal-close{ | |
position: absolute; | |
top:10px; | |
right:10px; | |
padding:0; | |
margin:0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment