Common input Box click the Glow white outer shadow focus

Source: Internet
Author: User

First of all to see the effect of the implementation of the first is to click on the effect of input to the default Google click Input is the blue border removed with outline:0; Implementation effect with focus the default state of the border color is generally heavier as border:1px solid #d8d8d8; Background color background: #fcfcfc; There are also corner round border-radus:0.35em;

Focus Click to give a shadow Box-shadow; Border background are all white

input:focus{outline:0; box-shadow:0 0 5px #ccc; Border-color: #fff; Background: #fff;}

Instance

<p class= "field" > <input id= "name" name= "name" type= "text" placeholder= "User name" class= "User-name" ></p>

Css

. field input{                    width:85%;                    Height:2.5em;//input height                    margin-top:2%;                    border:1px solid #d8d8d8;                    Background: #fcfcfc;                    Line-height:2em;                    border-radius:0.45em;                }                /* Mouse point input*/                . Field input:focus{                    -webkit-box-shadow:0 0 5px #ccc;/* Click on the outer shadow of input */                    -moz-box-shadow:0 0 5px #ccc;                    box-shadow:0 0 5px #ccc;                    Border-color: #fff;/* Black border changed to white *                    /outline:0;/* Remove default Google Click input border display Blue  *                    /background: #fff;/*input background is white */                }

  

  

Common input Box click the Glow white outer shadow focus

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.