Css 搜索框/转换赢得';我不能在Firefox中工作

Css 搜索框/转换赢得';我不能在Firefox中工作,css,firefox,Css,Firefox,我禁用了IE上的搜索框,因为IE一直将其置于导航的中心。 它在Chrome中工作,我不确定opera(我也不确定我是否在乎),但在Firefox中不会工作。在Firefox中,放松计时是有效的,但其他任何东西都不起作用 我尝试过其他方法来解决这个问题,但每次我尝试不同的方法时,搜索框的定位都会被取消 如果你在Firefox中查看它,它看起来很好——直到你点击它进行搜索。如果您查看搜索框并在Chrome中单击它,您可以看到搜索框应该做什么 我肯定定位是关闭的,我不确定(我是css新手)。感谢您的帮

我禁用了IE上的搜索框,因为IE一直将其置于导航的中心。 它在Chrome中工作,我不确定opera(我也不确定我是否在乎),但在Firefox中不会工作。在Firefox中,放松计时是有效的,但其他任何东西都不起作用

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

如果你在Firefox中查看它,它看起来很好——直到你点击它进行搜索。如果您查看搜索框并在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;
}

你忘了编辑左边的边距。


同时使用
position:fixed
float
有点奇怪。@user2522488下面是我的答案。检查一下。尝试解释问题,而不是生成视图。
#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;
}