我在一个具有一些功能的模拟网站上工作。我正在使用html,css和js。我正在使用cycle插件来循环浏览我创建的一些选项卡。我会发布我的代码,然后解释我想要做的事情:
我的html:
<div id="content">
<div id="image_selector" class="image_selector">
<div class ="image">
<ul>
<li><a id="Mpowered" href="">Mpowered</a></li>
<li><a id="Technology" href="">Technology</a></li>
<li><a id="Consulting" href="">Consulting</a></li>
<li><a id="Outsourcing" href="">Outsourcing</a></li>
</ul>
</div>
</div>
<div class="cell">
<div class="description">
<img id="demoimg" src="/home/***/HTML/launch_pad/images/productivity.png" alt="demo pic"/>
<h2>Who are we?</h2>
<p> a consulting company... ect</p>
</div>
<div class="description">
<img id="demoimg" src="/home/***/HTML/launch_pad/images/tech1.jpg" alt="tech"/>
<h2>We have the tech!</h2>
<p> lots of tech!!.... ect</p>
</div>..。还有两个描述部分,分别对应于我现在作为标签制作的每个"a“标记。
css如下所示:
.image_selector {
border: 1px dotted green;
height: 130px;
}
.image li {
float: left;
border: 1px solid white;
height: 100px;
width: 103px;
margin-left: 86px;
overflow: hidden;
text-align: center;
}
.image li a {
padding: 74px 0px 0px 0px;
color: white;
text-shadow: 0 0 0.6em #0197E8;
font-size: 17px;
letter-spacing: 1px;
text-decoration: none;
display: block;
height: 80px;
background-repeat: no-repeat;
}
.image li a:hover {
text-shadow: 0 0 0.6em #0197E8, 0 0 0.4em #0197E8, 0 0 0.6em #0197E8;
}
.image li #Mpowered {
background-image: url('/home/ruberto/HTML/launch_pad/images/mpower.png');
background-position: center top;
}
.image li #Technology {
background-image: url('/home/ruberto/HTML/launch_pad/images/tech.png');
background-position: center top;
}
.image li #Consulting {
background-image: url('/home/ruberto/HTML/launch_pad/images/consulting.png');
background-position: center top;
}
.image li #Outsourcing {
background-image: url('/home/ruberto/HTML/launch_pad/images/outsourcing.png');
background-position: center top;
}
.cell {
border: 1px dashed green;
height: 318px;
width: 715px;
float: left;
}
#demoimg {
float: left;
position: static;
margin: 16px 8px 0px 0px;
height: 200px;
width: 200px;
}和javascript iam使用:
$('.cell')
.before('<div class="image">')
.cycle({
fx: 'turnDown',
speed: 'fast',
timeout: 0,
pager: '.image'
});所以我已经在线阅读了,现在理解了pager选项现在将在div的正上方创建自己的导航区,其中包含我想要旋转的内容。我想知道有没有一种方法可以只引用我设置为“tag”的"image“标记来作为cell类的导航函数??
如果没有办法,任何人都能推荐一些可以替代它的东西吗?
发布于 2012-03-28 05:42:11
假设您想引用这些li,甚至将这些li映射到其他功能,或者甚至构建另一个可引用的寻呼机,这听起来可能需要您这样做,您可能需要.index为这些成对连接提供一个引用。
要启动一个复制的分页程序,请将这些元素克隆到其他地方,然后可以简单地使用css不显示原始文件,但将其留在原处,以便cycle可以使用它进行分页//创建二级菜单$('#pager').find('li').clone().appendTo('#navpage ul');
然后,如果想要将两个寻呼机配对,请从以下功能http://jsfiddle.net/moneylotion/KhL3W/开始
https://stackoverflow.com/questions/9836132
复制相似问题