【发布时间】:2012-01-07 00:50:47
【问题描述】:
请查看我的 JSFiddle
#searchbar {
float: left;
display: inline;
background: #FFFFFF;
height: 29px;
width: 660px;
border: 1px solid #bdbdbd;
margin: 55px 0px 0px 10px;
font-size : 17px;
font-family : Georgia;
font : 17px Georgia, Times, âTimes New Romanâ, serif;
color : #333333;
}
#searchbar:focus {
float: left;
display: inline;
background: #FFFFFF;
height: 29px;
width: 660px;
border: 1px solid #2e9afe;
margin: 55px 0px 0px 10px;
font-size : 17px;
font-family : Georgia;
font : 17px Georgia, Times, âTimes New Romanâ, serif;
color : #333333;
-moz-box-shadow: 0 0 2px #2e9afe;
-webkit-box-shadow: 0 0 2px#2e9afe;
box-shadow: 0 0 2px #2e9afe;
}
input:focus {
outline : none;
}
<form><input type="text" id="searchbar" autofocus="autofocus"/></form>
我怎样才能在自动对焦上像 chrome、safari、opera 和 firefox for IE 一样进行此操作?
【问题讨论】:
标签: html css cross-browser