Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 输入字段周围的不可见边框不工作_Html_Css_Input - Fatal编程技术网

Html 输入字段周围的不可见边框不工作

Html 输入字段周围的不可见边框不工作,html,css,input,Html,Css,Input,这是我的搜索栏和按钮的代码。我使用图像作为背景,希望输入字段边框显示,但它似乎不起作用 .masthead-search input[type=search] { background: url(http://localhost:6868/wp-content/uploads/2014/01/search-button11.png) no-repeat; float: left; border: 1px solid #fff; font-size: 11px; padding: 0 10px;

这是我的搜索栏和按钮的代码。我使用图像作为背景,希望输入字段边框显示,但它似乎不起作用

.masthead-search input[type=search] {
background: url(http://localhost:6868/wp-content/uploads/2014/01/search-button11.png) no-repeat;
float: left;
border: 1px solid #fff;
font-size: 11px;
padding: 0 10px;
width: 130px;
height: 28px;
line-height: 28px;
border: none;
-webkit-appearance: none;
border-radius: 10px;}
这是我在wordpress的php文件中的代码:

<input type="search" class="field" name="s" style="border: 1px #fff;"value="<?php echo esc_attr( get_search_query() ); ?>" id="s" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'wpex' ); ?>"/> 

CSS中有两个边框定义:

.masthead-search input[type=search] {
....
border: 1px solid #fff;
...
....
border: none;
-webkit-appearance: none;
border-radius: 10px;}
以及应用于字段的样式(缺少一个参数):

试试这个

  .masthead-search input[type=search] {
background: url("http://localhost:6868/wp-content/uploads/2014/01/search-button11.png") no-repeat;
float: left;
border: 1px solid #fff;
font-size: 11px;
padding: 0 10px;
width: 130px;
height: 28px;
line-height: 28px;
border: none;
-webkit-appearance: none;
border-radius: 10px;}

哎呀,我刚刚去掉了一个边界定义,但它似乎仍然不起作用!使用:
yupp我正在尝试,但它似乎对我的搜索栏没有任何影响。除了这两个,这个定义还会在其他地方吗?我想我已经找到了解决办法!当我把它作为原始代码时,我的孩子主题中的所有代码都能完美地工作。。。所以这就是我要做的,希望将来的更新能支持这种操作,直到在一个区块中有两个不同的边界定义?
  .masthead-search input[type=search] {
background: url("http://localhost:6868/wp-content/uploads/2014/01/search-button11.png") no-repeat;
float: left;
border: 1px solid #fff;
font-size: 11px;
padding: 0 10px;
width: 130px;
height: 28px;
line-height: 28px;
border: none;
-webkit-appearance: none;
border-radius: 10px;}