من اجمل الفورم المستخدمه فيها حركة جميله باستخدام css3 و jquery

نضع هذا الكود مابين <head>    </head>

  1. <script type="text/javascript">// <![CDATA[
  2.    $(function(){     var $form_inputs =   $('form input');     var $rainbow_and_border = $('.rain, .border');     /* Used to provide loping animations in fallback mode */     $form_inputs.bind('focus', function(){      $rainbow_and_border.addClass('end').removeClass('unfocus start');     });     $form_inputs.bind('blur', function(){      $rainbow_and_border.addClass('unfocus start').removeClass('end');     });     $form_inputs.first().delay(800).queue(function() {    $(this).focus();     });   });
  3. // ]]></script>

كود الاستايل

body{
  1.     background: #000;
  2.     color: #DDD;
  3.     font-family: 'Helvetica', 'Lucida Grande', 'Arial', sans-serif;
  4.    }
  5.    .border,
  6.    .rain{
  7.     height: 170px;
  8.     width: 320px;
  9.    }
  10.    /* Layout with mask */
  11.    .rain{
  12.      padding: 10px 12px 12px 10px;
  13.      -moz-box-shadow: 10px 10px 10px rgba(0,0,0,1) inset, -9px -9px 8px rgba(0,0,0,1) inset;
  14.      -webkit-box-shadow: 8px 8px 8px rgba(0,0,0,1) inset, -9px -9px 8px rgba(0,0,0,1) inset;
  15.      box-shadow: 8px 8px 8px rgba(0,0,0,1) inset, -9px -9px 8px rgba(0,0,0,1) inset;
  16.      margin: 100px auto;
  17.    }
  18.    /* Artifical "border" to clear border to bypass mask */
  19.    .border{
  20.     padding: 1px;
  21.     -moz-border-radius: 5px;
  22.        -webkit-border-radius: 5px;
  23.     border-radius: 5px;
  24.    }
  25.  
  26.    .border,
  27.    .rain,
  28.    .border.start,
  29.    .rain.start{
  30.     background-repeat: repeat-x, repeat-x, repeat-x, repeat-x;
  31.     /* Blue-ish Green Fallback for Mozilla */
  32.     /* Add "Highlight" Texture to the Animation */
  33.      background-color: #39f;
  34.    background-image: -webkit-gradient(linear, left top, right top, color-stop(1%,rgba(0,0,0,.3)), color-stop(23%,rgba(0,0,0,.1)), color-stop(40%,rgba(255,231,87,.1)), color-stop(61%,rgba(255,231,87,.2)), color-stop(70%,rgba(255,231,87,.1)), color-stop(80%,rgba(0,0,0,.1)), color-stop(100%,rgba(0,0,0,.25)));/* Starting Color */
  35.     }
  36.  
  37.    /* Non-keyframe fallback animation */
  38.    .border.end,
  39.    .rain.end{
  40.     -moz-transition-property: background-position;  
  41.     -moz-transition-duration: 30s;
  42.     -moz-transition-timing-function: linear;
  43.     -webkit-transition-property: background-position;  
  44.     -webkit-transition-duration: 30s;  
  45.     -webkit-transition-timing-function: linear;
  46.     -o-transition-property: background-position;  
  47.     -o-transition-duration: 30s;  
  48.     -o-transition-timing-function: linear;
  49.     transition-property: background-position;  
  50.     transition-duration: 30s;  
  51.     transition-timing-function: linear;
  52.     background-position: -5400px 0, -4600px 0, -3800px 0, -3000px 0;
  53.    }
  54.  
  55.    /* Keyfram-licious animation */
  56.    @-webkit-keyframes colors {
  57.        0% {background-color: #39f;}
  58.        15% {background-color: #F246C9;}
  59.        30% {background-color: #4453F2;}
  60.        45% {background-color: #44F262;}
  61.        60% {background-color: #F257D4;}
  62.        75% {background-color: #EDF255;}
  63.        90% {background-color: #F20006;}
  64.        100% {background-color: #39f;}
  65.       }
  66.       .border,.rain{
  67.        -webkit-animation-direction: normal;
  68.        -webkit-animation-duration: 20s;
  69.        -webkit-animation-iteration-count: infinite;
  70.        -webkit-animation-name: colors;
  71.        -webkit-animation-timing-function: ease;
  72.       }
  73.  
  74.       /* In-Active State Style */
  75.    .border.unfocus{
  76.     background: #333 !important;
  77.      -moz-box-shadow: 0px 0px 15px rgba(255,255,255,.2);
  78.      -webkit-box-shadow: 0px 0px 15px rgba(255,255,255,.2);
  79.      box-shadow: 0px 0px 15px rgba(255,255,255,.2);
  80.      -webkit-animation-name: none;
  81.    }
  82.    .rain.unfocus{
  83.     background: #000 !important;
  84.     -webkit-animation-name: none;
  85.    }
  86.  
  87.    /* Regular Form Styles */
  88.    form{
  89.     background: #212121;
  90.     -moz-border-radius: 5px;
  91.     -webkit-border-radius: 5px;
  92.        border-radius: 5px;
  93.     height: 100%;
  94.     width: 100%;
  95.     background: -moz-radial-gradient(50% 46% 90deg,circle closest-corner, #242424, #090909);
  96.     background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 150, from(#242424), to(#090909));
  97.    }
  98.    form label{
  99.     display: block;
  100.     padding: 10px 10px 5px 15px;
  101.     font-size: 11px;
  102.     color: #777;
  103.    }
  104.    form input{
  105.     display: block;
  106.     margin: 5px 10px 10px 15px;
  107.     width: 85%;
  108.     background: #111;
  109.     -moz-box-shadow: 0px 0px 4px #000 inset;
  110.     -webkit-box-shadow: 0px 0px 4px #000 inset;
  111.     box-shadow: 0px 0px 4px #000 inset;
  112.     outline: 1px solid #333;
  113.     border: 1px solid #000;
  114.     padding: 5px;
  115.     color: #444;
  116.     font-size: 16px;
  117.    }
  118.    form input:focus{
  119.     outline: 1px solid #555;
  120.     color: #FFF;
  121.    }
  122.    input[type="submit"]{
  123.     color: #999;
  124.     padding: 5px 10px;
  125.     float: right;
  126.     margin: 20px 0;
  127.     border: 1px solid #000;
  128.     font-weight: lighter;
  129.     -moz-border-radius: 15px;
  130.        -webkit-border-radius: 15px;
  131.     border-radius: 15px;
  132.     background: #45484d;
  133.     background: -moz-linear-gradient(top, #222 0%, #111 100%);
  134.     background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#222), color-stop(100%,#111));
  135.     filter: progid :D XImageTransform.Microsoft.gradient( startColorstr='#22222', endColorstr='#11111',GradientType=0 );
  136.     -moz-box-shadow: 0px 1px 1px #000, 0px 1px 0px rgba(255,255,255,.3) inset;
  137.     -webkit-box-shadow: 0px 1px 1px #000, 0px 1px 0px rgba(255,255,255,.3) inset;
  138.     box-shadow: 0px 1px 1px #000,0px 1px 0px rgba(255,255,255,.3) inset;
  139.     text-shadow: 0 1px 1px #000;
  140.    }

اضف هذا الكود بعد

  1. <div class="rain">
  2. <div class="border start"><form><label for="email">Email</label> <input type="text" name="email" /> <label for="pass">Password</label> <input type="password" name="pass" /> <input type="submit" value="LOG IN" /></form>&nbsp;
  3.  
  4. </div>
  5.  
  6.  
  7. </div>

لا يعمل هذا الاسكربت على الفيرفوكس يمكنك مشاهدته على الكروم او السفارى

لمشاهدة الاسكربت اضغط هنا

مروة سوفت

التصنيف :CSS  أوسمة :
يمكنك البقاء على إطلاع بالتعليقات على هذا الموضوع عن طريق RSS 2.0 الخلاصات. يمكنك ترك تعليق , أو تقفي هذا الموضوع من موقعك.
3 تعليق
  1. Madyan قال:

    شي جميل جداً..

  2. Ayman Fekri قال:

    جميل جدا … شغال عندي على الفايرفوكس

  3. mirosoft قال:

    افتحها على الكروم و شوف الفرق

اترك تعليقا

XHTML: يمكنك استخدام هذه الوسوم في ردك : : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>