Smooth Hover Effect – Text Input Field – Input Field Featured කරන හැටි – 2

dhanush_c

Active member
  • Apr 11, 2015
    150
    119
    43
    ලංකාවේ
    www.youtube.com
    Smooth Hover Effect – Text Input Field – Input Field Featured කරන හැටි – 2

    Smooth Hover Effect – Text Input Field – Input Field Featured කරන හැටි – 2

    මේ පොස්ට් එකෙන් කියන්න හදන්නෙත් කලින් පොස්ට් එකේ වගේම web design trick එකක්. එහෙනම් බලමු මොකද්ද මේ designing trick එක කියලා. මේකෙන් කරන්නේ css වලින් effects වලට smooth එකක් දෙන එක. මේක කැමති ඕනෑම HTML element එකකට add කරගන්න පුළුවන්. මේ වගේ tricks වලින් පුළුවන් site එකක තියන attraction එක, user-friendly ගතිය වැඩි වෙනවා.

    කලින් වගේම මුලින්ම HTML code එක ඕන කරනවා. මේකේ තියෙන්නේ නිකන්ම code line එකක් තියෙන්නේ.


    HTML:
    <input type="text" placeholder="Input your text here"/>


    දැන් බලමු මේකේ CSS code එක කොහොමද කියලා.


    Code:
    input {
        font-size: 14px;
        font-size: 0.75rem;
        padding: 10px;
        border: 1px solid #d7d8d8;
        -moz-transition: all 0.25s ease-in-out;
        transition: all 0.25s ease-in-out;
    }
    
    input[type=text] {
         width: 60%;
    }
    input[type=text]:focus, textarea:focus {
         border: 1px solid #e649
    }


    මේකේ තියන attributes වෙනස් කරලා colors වෙනස් කරලා කැමති විදියට හදාගන්න පුළුවන්. මෙතනින් බලන්න පුළුවන් working example එකක් බලන්න පුළුවන්.

    hover.png

    පැහැදිලි නැති දෙයක් තියනවා නම් Comment කරලා අහන්න. ලිපිය ගැන අදහසක් දුන්නොත් තව හොඳට tutorial එක කරන්න පුළුවන්.
     
    Last edited:

    Lakshan-Seram

    Well-known member
  • May 31, 2011
    24,735
    12,650
    113
    127.0.0.1:8080/Kandy
    ela den godak welawata use wenne placeholder ekai css3 transition thama.. eth IE sucks :growl:

    okama wenas karala focus eke denma nam ela.. godak welawata focus thama yanne textbox walata

    PHP:
    input[type=text]:focus,
    textarea:focus {
         border: 1px solid #e64946; 
    }
     
    Last edited: