這是我的搜索欄和按鈕的代碼。我使用的圖片作爲背景,並想輸入域邊界dissappear,但它似乎並不奏效輸入字段周圍的不可見邊框不起作用
.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;}
這是我在php文件中的代碼爲WordPress:
<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 …', 'placeholder', 'wpex'); ?>"/>
哎呀我剛剛擺脫了一個邊界的定義,但它似乎仍然沒有奏效! – user3219859
跟隨:'
yupp我正在嘗試它,但它似乎對我的搜索欄沒有任何影響。定義是否可以在另外一個位置而不是這兩個位置? – user3219859