我的第一个 jquery .css
ol,ul
{
list-style: none;
padding: 0;
margin: 0 auto;
width: 42em;
height: 28em;
}
li
{
height: 24em;
width: 24em;
text-align: center;
cursor: pointer;
}
li img
{
width: 100%;
}
li.roundabout-in-focus
{
cursor: default;
}
li span
{
display: block;
padding-top: 6em;
}
#carbonads-container
.carbonad
{
margin: 0 auto;
}
.html 代码
<script src="js/jquery_002.js" type="text/javascript"></script>
<script src="js/jquery.js" type="text/javascript"></script>
<script language="javascript">
$(document).ready(function () {
$('ul').roundabout();
});
</script>
<ul class="roundabout-moveable-item roundabout-in-focus" style="padding: 0px; position: relative;">
<li style="position: absolute; opacity: 1; z-index: 280;" class="roundabout-moveable-item">
<img src="img1.jpg" /></li></ul>
注意:
用图像重复 5 li标签,像这样显示
及其工作正常
但在同一页面中,我使用了另一个 jquery,它的 .css 类是
.slider {
float:left;
left: -5000px;
margin:10px;
position:relative;
visibility:hidden;
}
.slider ul.menu {
height:100px;
width:990px;
}
.slider ul.menu li.menu1 {
padding:0px 4px 0px 4px;
}
.slider ul.menu li.menu1 img {
cursor:pointer;
height:110px;
padding-top:0px;
width:177px;
}
.html 代码是
<script type="text/javascript" src="js1/jcarousellite_1.0.1.pack.js"></script>
<script type="text/javascript" src="js1/captify.tiny.js"></script>
<script type="text/javascript">
$(function () {
$(".slider").jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
visible: 5
});
});
$(document).ready(function () {
$('img.captify').captify({
speedOver: 'fast',
});
});
</script>
<div class="slider">
<ul class="menu">
<li class="menu1">
<img src="images/gallery1/1.jpg" border="0" alt="" /></li></ul></div>
注意:重复li标签,它看起来像滑块
但是在检查元素上,我看到上面的 ul 类为class="menu roundabout-holder"和 li 类为class="menu1 roundabout-moveable-item roundabout-in-focus" 并且具有不同的样式和 2 nd 脚本不起作用