CSS/HTML: Create a glowing border around an Input Field

后端 未结 11 2390
野的像风
野的像风 2020-12-02 03:39

I want to create some decent inputs for my form, and I would really like to know how TWITTER does their glowing border around their inputs.

Example/Picture of the Tw

11条回答
  •  情话喂你
    2020-12-02 04:35

    How about something like this... http://jsfiddle.net/UnsungHero97/Qwpq4/1207/

    enter image description here

    CSS

    input {
        border: 1px solid #4195fc; /* some kind of blue border */
    
        /* other CSS styles */
    
        /* round the corners */
        -webkit-border-radius: 4px;
           -moz-border-radius: 4px;
                border-radius: 4px;
    
    
        /* make it glow! */
        -webkit-box-shadow: 0px 0px 4px #4195fc;
           -moz-box-shadow: 0px 0px 4px #4195fc;
                box-shadow: 0px 0px 4px #4195fc; /* some variation of blue for the shadow */
    
    }
    

提交回复
热议问题