/*任务九、显示下拉导航菜单,并其设置一个变形效果*/
.nav-menu > li:hover ul {
display: block;
transform: rotateX(0deg);
}
.nav-menu > li:hover ul {
display: block;
transform: rotateX(0deg);
}
2017-05-11
/*任务八、设置导航当前状态与悬浮状态下的背景效果*/
.nav-menu li a:hover .back {
background-color: #51938f;
background-size: 5px 5px;
background-position: 0 0, 30px 30px;
background-image:linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480);
}
.nav-menu li a:hover .back {
background-color: #51938f;
background-size: 5px 5px;
background-position: 0 0, 30px 30px;
background-image:linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480);
}
2017-05-11
/*任务六、“.three-d-box”设置过渡与变形效果*/
transition: all .3s ease-out;
transform-style: preserve-3d;
/*任务七、给导航设置3D前,与3D后变形效果*/
.front {
transform: rotatex(0deg) translatez(25px);
}
.back {
transform: rotatex(-90deg) translatez(25px);
color: #FFE7C4;}
transition: all .3s ease-out;
transform-style: preserve-3d;
/*任务七、给导航设置3D前,与3D后变形效果*/
.front {
transform: rotatex(0deg) translatez(25px);
}
.back {
transform: rotatex(-90deg) translatez(25px);
color: #FFE7C4;}
2017-05-11
/* 任务三、设置3D舞台布景 */
perspective:200;
/*任务四、设置3D舞台布景过渡效果*/
transition:all 0.07 linear;
/*任务五、给不是当前状态的3D舞台的悬浮与聚焦状态设置变形效果*/
.three-d:not(.active):focus .three-d-box {
transform: translateZ(-25px) rotateX(90deg);
}
perspective:200;
/*任务四、设置3D舞台布景过渡效果*/
transition:all 0.07 linear;
/*任务五、给不是当前状态的3D舞台的悬浮与聚焦状态设置变形效果*/
.three-d:not(.active):focus .three-d-box {
transform: translateZ(-25px) rotateX(90deg);
}
2017-05-11
/*任务一:引入本地字体文件*/
@font-face{
font-family:"sansationregular";
src:url('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/sansation_regular-webfont.woff') format('woff');
}
/*任务二:调用本地字体*/
font-family:"sansationregular";
@font-face{
font-family:"sansationregular";
src:url('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/sansation_regular-webfont.woff') format('woff');
}
/*任务二:调用本地字体*/
font-family:"sansationregular";
2017-05-11
这个课程讲透了3D http://www.imooc.com/video/1051,老师写的Demo非常直观帮忙理解3D变形
2017-05-11
“为什么会一直循环跑呢?跑完一圈也不停,上一章我把hover去掉他变颜色也只是一轮,变完就不变了,求解”,
这是因为动画循环此数设置了无数次animation-iteration-count:infinite;
这是因为动画循环此数设置了无数次animation-iteration-count:infinite;
2017-05-11
没用之前的,自己想的却碰对了
.wrapper > div:nth-of-type(2n+1),
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:nth-of-type(odd),
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:nth-last-of-type(even),
.wrapper > p:nth-of-type(even){
background: orange;
}
.wrapper > div:nth-of-type(2n+1),
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:nth-of-type(odd),
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:nth-last-of-type(even),
.wrapper > p:nth-of-type(even){
background: orange;
}
2017-05-10
.wrapper > div:nth-of-type(2n+1),
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:nth-of-type(odd),
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:nth-last-of-type(odd)
.wrapper > p:nth-of-type(even){
background: orange;
}
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:nth-of-type(odd),
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:nth-last-of-type(odd)
.wrapper > p:nth-of-type(even){
background: orange;
}
2017-05-10