-->

إنشاء حقل input باستخدام CSS


السلام عليكم ورحمة الله وبركاته

forms using CSS

أولا : كود الـ html
<link rel="stylesheet" href="css/style.css">



ثانيا : كود الـ CSS
input[type=password] {
  background: url(../img/keyIcon.png) 12px 11px no-repeat, -moz-linear-gradient(top, #f7f7f8 0%, #ffffff 100%);
  background: url(../img/keyIcon.png) 12px 11px no-repeat, -webkit-linear-gradient(top, #f7f7f8 0%, #ffffff 100%);
  background: url(../img/keyIcon.png) 12px 11px no-repeat, -o-linear-gradient(top, #f7f7f8 0%, #ffffff 100%);
  background: url(../img/keyIcon.png) 12px 11px no-repeat, -ms-linear-gradient(top, #f7f7f8 0%, #ffffff 100%);
  background: url(../img/keyIcon.png) 12px 11px no-repeat, linear-gradient(to bottom, #f7f7f8 0%, #ffffff 100%);
  border-radius: 3px;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset, 0 -1px 0 rgba(0, 0, 0, 0.05) inset;
  -webkit-transition: all 0.2s linear;
  -moz-transition: all 0.2s linear;
  -ms-transition: all 0.2s linear;
  -o-transition: all 0.2s linear;
  transition: all 0.2s linear;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 13px;
  color: #222222;
  position: relative;
  height: 36px;
  width: 300px;
  padding-left: 30px;
}

input[type=password]::-webkit-input-placeholder {
  color: #999999;
}

input[type=password]:-moz-placeholder {
  color: #999999;
}

input[type=password]:focus {
  box-shadow: 0 1px 0 #2392f3 inset, 0 -1px 0 #2392f3 inset, 1px 0 0 #2392f3 inset, -1px 0 0 #2392f3 inset, 0 0 4px rgba(35, 146, 243, 0.5);
  outline: none;
  background: url(../img/keyIcon.png) 12px 11px no-repeat, #ffffff;
}

لاتنسي تغيير مسار صورة المفتاح

ولتحميل المفتاح من هنا

ليس هنالك تعليقات :

إرسال تعليق

جميع الحقوق محفوظة لموقع © Elmohandes

تصميم : مصطفى صلاح