您好,目前我的网站遇到2个问题:
当我向下滚动文本弹出另一个顶栏时
这是网站http://www.onetechsearch.com/
<style type="text/css">
#picture-side {
display: block;
float:left;
z-index: 10;
top: 10px;
left: 10px;
}
input[type="radio"]:checked+label{ border-bottom: 5px solid lime; }
#picture-side1 {
display: block;
float:left;
z-index: 10;
top: 10px;
left: 10px;
}
.site-wrap {
display: none;
}
#picture-side2 {
display: block;
float:left;
z-index: 10;
top: 10px;
left: 10px;
}
#picture2 {
visibility: hidden;
}
#video {
visibility: hidden;
}
#picture {
visibility: hidden;
}
</style>
<script src="jquery-1.8.0.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/js/select2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var cat= ["Australia", "Bangladesh", "Denmark", "Hong Kong", "Indonesia", "Netherlands", "New Zealand", "South Africa", "C"];
$("#cat").select2({
data: cat
});
});
</script>
<div id="topbar">
<div class="width-container">
<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div id="search">
<form action="<?php bloginfo('url');?>/recipes" method="GET" id="searchF">
<?php
$searched_term = get_query_var('recipe_search');
if (empty($searched_term)) {
$searched_term = isset($_GET["search"]) ? $_GET["search"] : "";
}
?>
<input id="sfield" type="text" name="search" placeholder="keywords" <?php if (!empty($searched_term)) {echo 'value="'.$searched_term.'"';} ?>>
<input type="submit" value="Search">
<div id="picture-side">
<input type="radio" name="images" value="1" id="picture"
<?php if(isset($_GET["images"]) && $_GET["images"]=='1'){ echo 'Checked';} ?>><label for="picture">With Pictures</label>
</div>
<div id="picture-side1">
<input type="radio" name="images" value="0" id="picture2"
<?php if(isset($_GET["images"]) && $_GET["images"]=='0'){ echo 'checked';} ?>><label for="picture2">Without Pictures</label>
</div>
<div id="picture-side2">
<input type="radio" name="video" value="0" id="video"
<?php if(isset($_GET["video"]) && $_GET["video"]=='0'){ echo 'checked';} ?>><label for="video">With video</label>
</div>
<div id="time-side">
<!--<small>Published time</small>-->
<input type="text" id="from-side" name="from" placeholder="Start date"
</div>
<select id="cat" name="cat">
<option value="all" selected>All categories</option>
<option value="HI">Hawaii</option>
<option value="C">Hawaji</option>
</select>
</div>
</div>
</form>
</div>
</div>
答案 0 :(得分:0)
您的topbar的z-index设置为999,“smtitle”也具有相同的z-index,您唯一需要做的就是将“smtitle”z-index设置为998或更低(如果可能)。
答案 1 :(得分:-1)
您提供的链接包含&#39;图片&#39; GET变量集并且它设置为空,在php中表示为0.这使得您的检查$_GET["images"]=='0'
验证为TRUE
。
答案 2 :(得分:-2)
您的单选按钮必须具有相同的名称值才能作为一个组使用 http://www.w3schools.com/html/tryit.asp?filename=tryhtml_radio