X

جستجو


فرم ورود و عضویت متریال

فرم ورود و عضویت متریال
  • اشتراک گذاری

با سلام خدمت تمامی عزیزان شورت کدز ، همان طور که میدانید بیشتر وب سایت ها ، دارای فرم ورود و عضویت میباشند حال چه فروشگاهی که وب سایت های سازمانی و … برای همین منظور داشتن یک فرم ورود و عضویت زیبا میتواند باعث جلب نظر و توجه کاربران شما گردد . در این پست قصد داریم روش ایجاد یک فرم ورود و عضویت متریال را بشما دوستان آموزش دهیم تا در وبسایت مناسبی با کمی تغییر در ظاهر استفاده نمایید .

کدهای فرم ورود و عضویت متریال

index.html

<!DOCTYPE html>
<html lang="en">
<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">
    <title>Material Login Form - shortcodes.ir</title>
    
    <link rel="stylesheet" href="http://cdn.font-store.ir/yekan.css" />
    <link rel="stylesheet" href="style.css" />
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" />
</head>
<body>
 
<div class="page-title">
    <h1>فرم عضویت متریال</h1> 
  </div>
 
  <div class="container">
    <div class="card"></div>
    <div class="card">
      <h1 class="title">ورود</h1>
      <form>
        <div class="input-container">
          <input type="text" id="labelUserName" required="required"/>
          <label for="labelUserName">نام کاربری</label>
          <div class="bar"></div>
        </div>
        <div class="input-container">
          <input type="password" id="labelPassword" required="required"/>
          <label for="labelPassword">گذرواژه</label>
          <div class="bar"></div>
        </div>
        <div class="button-container">
          <button><span>ورود</span></button>
        </div>
        <div class="footer"><a href="#">فراموشی رمز عبور</a></div>
      </form>
    </div>
    <div class="card alt">
      <div class="toggle"></div>
      <h1 class="title">عضویت
        <div class="close"></div>
      </h1>
      <form>
        <div class="input-container">
          <input type="text" id="labelUsernameReg" required="required"/>
          <label for="labelUsernameReg">نام کاربری</label>
          <div class="bar"></div>
        </div>
        <div class="input-container">
          <input type="password" id="labelPasswordReg" required="required"/>
          <label for="labelPasswordReg">گذرواژه</label>
          <div class="bar"></div>
        </div>
        <div class="input-container">
          <input type="password" id="labelRepeatPassword" required="required"/>
          <label for="labelRepeatPassword">تکرار گذرواژه</label>
          <div class="bar"></div>
        </div>
        <div class="button-container">
          <button><span>عضویت</span></button>
        </div>
      </form>
    </div>
  </div>
   
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  <script src="javascript.js" ></script>
</body>
</html>

Style.css

@charset "UTF-8";
*{
    direction: rtl;
 
}
body {
  background: #e9e9e9;
  color: #666666;
  font-family: "RobotoDraft", "Roboto", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

 
.page-title {
  padding: 50px 0;
  text-align: center;
  letter-spacing: 2px;
}
.page-title h1 {
    margin: 0 0 20px;
    font-size: 48px;
    font-weight: 300;
    font-family: 'yekan';
    letter-spacing: 0;
}
.container {
  position: relative;
  max-width: 460px;
  width: 100%;
  margin: 0 auto 100px;
}
.container.active .card:first-child {
  background: #f2f2f2;
  margin: 0 15px;
}
.container.active .card:nth-child(2) {
  background: #fafafa;
  margin: 0 10px;
}
.container.active .card.alt {
  top: 20px;
  right: 0;
  width: 100%;
  min-width: 100%;
  height: auto;
  border-radius: 5px;
  padding: 60px 0 40px;
  overflow: hidden;
}
.container.active .card.alt .toggle {
  position: absolute;
  top: 40px;
  right: -70px;
  box-shadow: none;
  transform: scale(10);
  transition: transform 0.3s ease;
}
.container.active .card.alt .toggle:before {
  content: "";
}
.container.active .card.alt .title,
.container.active .card.alt .input-container,
.container.active .card.alt .button-container {
  left: 0;
  opacity: 1;
  visibility: visible;
  transition: 0.3s ease;
}
.container.active .card.alt .title {
  transition-delay: 0.3s;
}
.container.active .card.alt .input-container {
  transition-delay: 0.4s;
}
.container.active .card.alt .input-container:nth-child(2) {
  transition-delay: 0.5s;
}
.container.active .card.alt .input-container:nth-child(3) {
  transition-delay: 0.6s;
}
.container.active .card.alt .button-container {
  transition-delay: 0.7s;
}

/* Card */
.card {
  position: relative;
  background: #ffffff;
  border-radius: 5px;
  padding: 60px 0 40px 0;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  transition: 0.3s ease;
}
.card:first-child {
  background: #fafafa;
  height: 10px;
  border-radius: 5px 5px 0 0;
  margin: 0 10px;
  padding: 0;
}
.card .title {
    position: relative;
    z-index: 1;
    border-right: 5px solid #ed2553;
    margin: 0 0 35px;
    padding: 10px 50px 10px 0px;
    color: #ed2553;
    font-size: 32px;
    font-weight: 600;
    font-family: "yekan";
}
.card .input-container {
  position: relative;
  margin: 0 60px 50px;
}
.card .input-container input {
  outline: none;
  z-index: 1;
  position: relative;
  background: none;
  width: 100%;
  height: 60px;
  border: 0;
  color: #212121;
  font-size: 24px;
  font-weight: 400;
  font-family: tahoma;
}
.card .input-container input:focus ~ label {
  color: #9d9d9d;
  transform: translate(12%, -50%) scale(0.75);
}
.card .input-container input:focus ~ .bar:before, .card .input-container input:focus ~ .bar:after {
  width: 50%;
}
.card .input-container input:valid ~ label {
  color: #9d9d9d;
  transform: translate(12%, -50%) scale(0.75);
}
.card .input-container label {
  position: absolute;
  top: 0;
  right: 0;
  color: #757575;
  font-size: 24px;
  font-weight: 300;
  line-height: 60px;
  transition: 0.2s ease;
  font-family: "yekan";
}
.card .input-container .bar {
  position: absolute;
  right: 0;
  bottom: 0;
  background: #757575;
  width: 100%;
  height: 1px;
}
.card .input-container .bar:before, .card .input-container .bar:after {
  content: "";
  position: absolute;
  background: #ed2553;
  width: 0;
  height: 2px;
  transition: 0.2s ease;
}
.card .input-container .bar:before {
  right: 50%;
}
.card .input-container .bar:after {
    left: 50%;
}
.card .button-container {
  margin: 0 60px;
  text-align: center;
}.card .button-container button {
  outline: 0;
  cursor: pointer;
  position: relative;
  display: inline-block;
  background: 0;
  width: 240px;
  border: 2px solid #e3e3e3;
  padding: 14px 0 20px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  overflow: hidden;
  transition: 0.3s ease;
}
.card .button-container button span {
  position: relative;
  z-index: 1;
  color: #ddd;
  transition: 0.3s ease;  font-family: "yekan";
}
.card .button-container button:before {
  content: "";
  position: absolute;
  top: 50%;
  right: 50%;
  display: block;
  background: #ed2553;
  width: 30px;
  height: 30px;
  border-radius: 100%;
  margin: -15px  -15px  0 0;
  opacity: 0;
  transition: 0.3s ease;
}
.card .button-container button:hover, .card .button-container button:active, .card .button-container button:focus {
  border-color: #ed2553;
}
.card .button-container button:hover span, .card .button-container button:active span, .card .button-container button:focus span {
  color: #ed2553;
}
.card .button-container button:active span, .card .button-container button:focus span {
  color: #ffffff;
}
.card .button-container button:active:before, .card .button-container button:focus:before {
  opacity: 1;
  transform: scale(10);
}
.card .footer {
  margin: 40px 0 0;
  color: #d3d3d3;
  font-size: 24px;
  font-weight: 300;
  text-align: center;
}
.card .footer a {
  color: inherit;
  font-family: "yekan";
  text-decoration: none;font-size: 17px;
  transition: 0.3s ease;
}
.card .footer a:hover {
  color: #bababa;
}
.card.alt {
  position: absolute;
  top: 40px;
  left: -70px;
  z-index: 10;
  width: 140px;
  height: 140px;
  background: none;
  border-radius: 100%;
  box-shadow: none;
  padding: 0;
  transition: 0.3s ease;
 
}
.card.alt .toggle {
  position: relative;
  background: #ed2553;
  width: 140px;
  height: 140px;
  border-radius: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  color: #ffffff;
  font-size: 58px;
  line-height: 140px;
  text-align: center;
  cursor: pointer;
}
.card.alt .toggle:before {
  content: "";
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translate(0, 0);
}
.card.alt .title,
.card.alt .input-container,
.card.alt .button-container {
  left: 100px;
  opacity: 0;
  visibility: hidden;
}
.card.alt .title {
  position: relative;
  border-color: #ffffff;
  color: #ffffff;
}
.card.alt .title .close {
  cursor: pointer;
  position: absolute;
  top: -17px;
  left: 60px;
  display: inline;
  color: #ffffff;
  font-size: 58px;
  font-weight: 400;
}
.card.alt .title .close:before {
  content: "×";
}
.card.alt .input-container input {
  color: #ffffff;
}
.card.alt .input-container input:focus ~ label {
  color: #ffffff;
}
.card.alt .input-container input:focus ~ .bar:before, .card.alt .input-container input:focus ~ .bar:after {
  background: #ffffff;
}
.card.alt .input-container input:valid ~ label {
  color: #ffffff;
}
.card.alt .input-container label {
  color: rgba(255, 255, 255, 0.8);
}
.card.alt .input-container .bar {
  background: rgba(255, 255, 255, 0.8);
}
.card.alt .button-container button {
  width: 100%;
  background: #ffffff;
  border-color: #ffffff;
}
.card.alt .button-container button span {
  color: #ed2553;
}
.card.alt .button-container button:hover {
  background: rgba(255, 255, 255, 0.9);
}
.card.alt .button-container button:active:before, .card.alt .button-container button:focus:before {
  display: none;
}

/* Keyframes */
@-webkit-keyframes buttonFadeInUp {
  0% {
    bottom: 30px;
    opacity: 0;
  }
}
@keyframes buttonFadeInUp {
  0% {
    bottom: 30px;
    opacity: 0;
  }
}

javascript.js

$(document).ready(function($){

$(".toggle").on("click", function () {
    $(".container").stop().addClass("active");
  });
  
  $(".close").on("click", function () {
    $(".container").stop().removeClass("active");
  });
      
});