Cannot read property 'className' of undefined
调试 clear_ctrl.className=clear_ctrl.className.replace(' ctrl-i_active','');这段语句类没定义
幻灯片效果
*{
margin: 0;
padding: 0;
}
body{
margin: 20px 0;
font-family: "Avenir Next";
font-size: 14px;
color: #555;
background-color: #fff;
-webkit-font-smoothing:antialiased;
}
.slider .main .main-i,
.slider .main,
.slider{
width: 100%;
height: 400px;
position: relative;
z-index: 2;
}
.slider .main .main-i,
.slider .main{
overflow: hidden;
}
.slider .main .main-i .caption{
position: absolute;
left:20%;
top: 50px;
z-index: 9;
}
.slider .main .main-i .caption h2{
margin-right: 100px;
font-size: 40px;
line-height:50px;
color: #B5B5B5;
text-align: right;
}
.slider .main .main-i .caption h3{
margin-right: -100px;
font-size: 70px;
line-height:70px;
color: #000000;
text-align: right;
font-family: "Open Sans Condensed";
}
.slider .main .main-i img{
position: absolute;
top:50%;
}
.slider .ctrl{
width: 100%;
height: 13px;
line-height: 13px;
text-align: center;
position: absolute;
left: 0;
bottom: -13px;
z-index: 6;
}
.slider .ctrl .ctrl-i{
display: inline-block;
width: 150px;
height: 13px;
background-color: #999;
box-shadow: 0 1px 1px rgba(0,0,0,.3);
position: relative;
margin-right: 2px;
}
.slider .ctrl .ctrl-i img{
width: 100%;
position: absolute;
bottom: 50px;
left: 0;
opacity: 0;
-webkit-transition:all .3s;
}
.slider .ctrl .ctrl-i:hover img{
opacity: 1;
-webkit-box-reflect:below 0px -webkit-gradient(
linear,
left top,
left bottom,
from(transparent),
color-stop(50%,transparent),
to(rgba(255,255,255,.3))
);
}
.slider .ctrl .ctrl-i:hover{
background-color: #f0f0f0;
}
.slider .ctrl .ctrl-i_active:hover,
.slider .ctrl .ctrl-i_active{ /*交集选择器之间的空格是必须的,否则不出效果*/
background-color: #000000;
}
.slider .main .main-i{
opacity: 0;
position: absolute;
right: 50%;
top: 0;
-webkit-transition:all .5s;
z-index: 2;
}
/* #main_background,*/
.slider .main .main-i_active{
opacity: 1;
right: 0;
}
#main_background{
z-index: -1;
}
.slider .main .main-i .caption h2,
.slider .main .main-i .caption h3{
opacity: 0;
-webkit-transition:all 1s 0.8s; /*延迟0.8秒*/
}
.slider .main .main-i_active .caption h2,
.slider .main .main-i_active .caption h3{
opacity: 1;
margin-right: 0;
}
{{h2}}
{{h3}}
|
免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。
版权声明:作者保留权利,不代表天盟立场。
|
|
|
|