单击搜索框时会在搜索框周围边框

nel*_*grl 2 html css

我在搜索框中发现了这个很棒的CSS,但是当我点击搜索框时,它周围会出现一个橙色边框(这不太吸引人,哈哈).如果有人可以建议我如何摆脱边界,将不胜感激.CSS如下:

#search input[type="text"] {
    background: url(search-white.png) no-repeat 10px 6px #fcfcfc;
    border: 1px solid #d1d1d1;
    font: bold 12px Arial,Helvetica,Sans-serif;
    color: #bebebe;
    width: 150px;
    padding: 6px 15px 6px 35px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;
    -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;
    -webkit-transition: all 0.7s ease 0s;
    -moz-transition: all 0.7s ease 0s;
    -o-transition: all 0.7s ease 0s;
    transition: all 0.7s ease 0s;
    }

#search input[type="text"]:focus {
    width: 200px;
    }
Run Code Online (Sandbox Code Playgroud)

如果有帮助的话,我已经为你创建了这个JSFiddle:http://jsfiddle.net/nkZ4p/

Kar*_*non 7

添加outline : none:focus:

#search input[type="text"]:focus {
    width: 200px;
    outline : none;
}
Run Code Online (Sandbox Code Playgroud)