我想知道如何隐藏附加面板的方式只有红色按钮显示在浏览器窗口的左侧,当我点击红色按钮出现整个面板.如果我再次点击红色按钮,面板会再次在浏览器窗口的左侧消失?

我知道我应该使用与相对定位的包装div相关的绝对定位,但这就是我的全部想法......
<div class="wrapper"><div id="panel"></div><!-- #panel --><p>content</p></div><!-- .wrapper -->
.wrapper {position: relative; margin: 0 auto; width: 800px; height: 500px;}
#panel {position: absolute; left: -150px; top: 50px;}
Run Code Online (Sandbox Code Playgroud) 我对你有很好的挑战.这里有下一个代码(实例:http://inturnets.com/test/test.html):
<!DOCTYPE html><html><head><title></title>
<style type="text/css">* {
margin: 0;
padding: 0;}a, a:hover {
text-decoration: none;
}
.grid {
width: 984px;
margin: 0 auto;
list-style: none;
height: 666px;
}
.grid li {
float: left;
position: relative;
}
.small + .small {
position: relative;
clear: left;
}
.large, .large a {
width: 393px;
height: 222px;
}
.small, .small a {
width: 198px;
height: 111px;
}
.small a, .large a {
display: block;
cursor: pointer;
color: #fff;
}
.overlay { …Run Code Online (Sandbox Code Playgroud) 我有下一个代码:
$(document).ready(function () {
$('#imgone').hide().delay(500).fadeIn(1000).delay(4500).fadeOut(500);
$('#imgtwo').hide().delay(1500).fadeIn(1000).delay(3500).fadeOut(500);
$('#imgthree').hide().delay(2500).fadeIn(1000).delay(2500).fadeOut(500);
});
Run Code Online (Sandbox Code Playgroud)
它更像是一个带jQuery的游乐场.好吧,首先我希望第一个图像淡入,然后是第二个图像然后是最后一个.在此之后,我希望所有图像在加载后淡出.
但我正在考虑两个新问题:
创造一个无限循环
使用超过3个图像,但一次只显示3个(我意识到这可能会影响id被改成其他东西)
有任何想法吗?
我不会在这里发布我是如何尝试实现循环的,只有一个有趣的方法:
$(document).ready(function () {
function runPics() {
$('#imgone').hide().delay(500).fadeIn(1000).delay(4500).fadeOut(500);
$('#imgtwo').hide().delay(1500).fadeIn(1000).delay(3500).fadeOut(500);
$('#imgthree').hide().delay(2500).fadeIn(1000).delay(2500).fadeOut(500);
} interval = setInterval(runPics, 3500);
});
Run Code Online (Sandbox Code Playgroud)
这段代码很糟糕,对吗?:P
我有以下情况:
<?php query_posts('page_id=2'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="entry">
<p><?php the_excerpt(); ?></p>
</div>
<?php endwhile; else : ?>
<?php endif; ?>
<?php wp_reset_query(); ?>
Run Code Online (Sandbox Code Playgroud)
但我也使用"高级摘录"插件,它提取缩略图作为摘录.如何删除"the_excerpt();"提取的默认缩略图?功能?我只想要"高级摘录"插件来处理摘录缩略图,因此不会有重复的缩略图.
我正在使用信息框插件创建具有不同内容的多个标记 - http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/examples/infobox-basic.html
此外,我使用markerclusterer插件在同一区域处理太多标记 - http://gmaps-utility-library-dev.googlecode.com/svn/tags/markerclusterer/1.0/src/markerclusterer.js
所有标记都正确显示,聚类工作完美.
问题.我的问题是我怎么才能点击一个信息框并关闭其他信息框,如果你选择另一个,它会打开并关闭其他信息框.
这是我目前的代码[ 更新 ]:http://jsfiddle.net/henrichro/mqrrA/
<script type="text/javascript" src="<?php echo get_bloginfo('template_directory'); ?>/js/markerclusterer.js"></script>
<script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/infobox/1.1.9/src/infobox.js"></script>
<script type="text/javascript">
// build portfolios list
var portfolios = [
<?php
global $post;
$type = 'portfolio';
$args = array(
'post_type' => $type,
'post_status' => 'publish',
'posts_per_page' => -1,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post();
$my_id = get_the_ID();
$my_title = get_the_title($my_id);
$my_permalink = get_permalink($my_id);
$site_type …Run Code Online (Sandbox Code Playgroud)