-1

我禁用了 IE 上的搜索框,因为 IE 一直将其置于导航的中心。它在 Chrome 中工作,我不确定歌剧(我不确定我是否关心)但它在 Firefox 中不起作用。缓出时间在 Firefox 中有效,但没有其他真正有效。

我已经尝试过其他方法来解决这个问题,但每次我尝试不同的方法时,搜索框的定位都会被抛出。

如果您在 Firefox 中查看它,它看起来还不错 - 直到您单击它进行搜索。http://kissoff.weebly.com/如果您在 Chrome 中查看并单击它,您可以看到搜索框应该做什么。

我确定定位已关闭,我不确定(我是 CSS 新手)。任何帮助表示赞赏。#搜索 {}

#search input[type="text"] {
background: url(search-white.png) no-repeat 10px 6px #fcfcfc;
border: 1px solid #d1d1d1;
position: fixed;
margin-left: 350px;
margin-right: 0px;
margin-top: 0px;
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;
float: right;
}
#search input[type="text"]:focus {
width: 200px;
}
4

1 回答 1

0

您忘记编辑左边距。 http://jsfiddle.net/xeemez/nZBNm/

#search{
background: url(search-white.png) no-repeat 10px 6px #fcfcfc;
border: 1px solid #d1d1d1;
position: fixed;
margin-left: 350px;
margin-right: 0px;
margin-top: 0px;
color: #bebebe;
width: 15px;
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;
float: right;

}
#search:focus {
width: 200px;
margin-left: 200px;
}

http://jsfiddle.net/xeemez/nZBNm/

于 2013-06-26T05:46:56.680 回答