Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 99精品免费在线,国产美女一级视频,精品国产专区91在线app

          整合營銷服務商

          電腦端+手機端+微信端=數據同步管理

          免費咨詢熱線:

          CSS3導航欄展開動畫效果

          CSS3導航欄展開動畫效果

          SS3導航欄展開動畫效果,實現不一樣的手風琴菜單展開收縮動畫效果!效果如下:

          實現代碼

          html:

          css:

          javascript:

          例簡介

          本文介紹利用JQ實現垂直導航功能,可點擊左導航欄切換右邊數據,也可滾動右邊數據切換左導航欄標簽,實現左右聯動效果,效果如下:



          實現過程

          html、css和js代碼如下:

          1、html和css代碼相對比較簡單,可自行查看;

          2、js代碼:

          1)$(window).scroll實現滾動右邊數據切換左導航欄的標簽:

          11、“($(this).offset().top-$(window).innerHeight()/2))”影響滾動位置切換;

          12、scroll_t定時器必須加,不然點擊切換會有抖動效果;

          2)tabs.children('li').click實現點擊左導航欄切換右邊數據。


          <svg width="0" height="0">
          			<defs>
          				<filter id="goo">
          					<feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" />
          					<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 19 -9" result="goo" />
          					<feComposite in="SourceGraphic" in2="goo" operator="atop" />
          				</filter>
          			</defs>
          		</svg>
          		<div class="target">
          			<div>
          				<i id="ball1" class="ball"></i>
          				<i id="ball2" ref="ball2" class="ball"></i>
          			</div>
          		</div>
          <div class="menu">
          			<div class="menu-item" @click="updageMenuItem(0)">
          				首頁
          				<span :class="{'menu-item-bg': menuActive==0}">
          					<i class="iconfont"></i>
          				</span>
          			</div>
          			<div class="menu-item" @click="updageMenuItem(1)">
          				發現
          				<span :class="{'menu-item-bg': menuActive==1}">
          					<i class="iconfont"></i>
          				</span>
          			</div>
          			<div class="menu-item" @click="updageMenuItem(2)">
          				消息
          				<span :class="{'menu-item-bg': menuActive==2}">
          					<i class="iconfont"></i>
          				</span>
          			</div>
          			<div class="menu-item" @click="updageMenuItem(3)">
          				我的
          				<span :class="{'menu-item-bg': menuActive==3}">
          					<i class="iconfont"></i>
          				</span>
          			</div>
          		</div>
          
          <script>
          updageMenuItem(index) {
          			this.menuActive=index;
          			let ball2=this.$refs.ball2;
          			Array(4)
          				.fill(0)
          				.map((item, it)=> {
          					ball2.classList.remove('active' + it);
          				});
          			setTimeout(()=>{
          				ball2.classList.add('active' + index);
          			},100)
          		}
          </script>
          
          <style lang="less" scoped>
          .profile {
          	height: 100%;
          	background: #aaaa7f;
          	font-size: 14px;
          	.menu,
          	.target {
          		position: absolute;
          		bottom: 0;
          		width: 100%;
          		height: 50px;
          		left: 0;
          	}
          	.target > div {
          		filter: url('#goo');
          	}
          	.menu {
          		display: flex;
          		z-index: 5;
          		background: #fff;
          		.menu-item {
          			flex: 1;
          			color: #333;
          			display: flex;
          			justify-content: center;
          			align-items: flex-end;
          			padding-bottom: 10px;
          			position: relative;
          			span {
          				position: absolute;
          				height: 35px;
          				width: 35px;
          				background: #aaaa7f;
          				border-radius: 50%;
          				left: 0;
          				right: 0;
          				margin: auto;
          				top: 0;
          				opacity: 0;
          				display: flex;
          				align-items: center;
          				justify-content: center;
          				i {
          					color: #fff;
          					font-size: 20px;
          				}
          				&.menu-item-bg{
          					animation: menuItemBg .5s .2s forwards;
          				}
          			}
          		}
          	}
          	.ball {
          		width: calc(100% + 60px);
          		height: 50px;
          		border-radius: 0;
          		background-color: #fff;
          		position: absolute;
          		left: -30px;
          		margin: auto;
          		z-index: 1;
          	}
          	#ball2 {
          		left: 0;
          		top: 0px;
          		width: 50px;
          		height: 50px;
          		margin: auto;
          		border-radius: 50%;
          		&.active0 {
          			left: calc(((100% / 4) - 50px) / 2);
          			animation: ballUp .5s forwards;
          		}
          		&.active1 {
          			left: calc(((100% / 4) - 50px) / 2 + 100% / 4);
          			animation: ballUp .5s forwards;
          		}
          		&.active2 {
          			left: calc(((100% / 4) - 50px) / 2 + (100% / 4) * 2);
          			animation: ballUp .5s forwards;
          		}
          		&.active3 {
          			left: calc(((100% / 4) - 50px) / 2 + (100% / 4) * 3);
          			animation: ballUp .5s forwards;
          		}
          	}
          }
          @keyframes ballUp {
          	from {
          		top: 0;
          	}
          	to {
          		top: -25px;
          	}
          }
          @keyframes menuItemBg {
          	from {
          		top: 0;
          		opacity: 0;
          	}
          	to {
          		top: -15px;
          		opacity: 1;
          	}
          }

          主站蜘蛛池模板: 精品少妇人妻AV一区二区三区| 一区二区三区视频在线观看| 精品91一区二区三区| 一区二区三区免费视频观看| 国产一区二区成人| 中文字幕不卡一区| 无码人妻aⅴ一区二区三区有奶水 人妻夜夜爽天天爽一区 | 久久无码精品一区二区三区| 怡红院AV一区二区三区| 亚洲一区在线免费观看| 夜色福利一区二区三区| 亚洲av午夜福利精品一区人妖| 国产一区二区三区樱花动漫| 麻豆果冻传媒2021精品传媒一区下载| 亚洲一区二区三区夜色| 精品少妇一区二区三区视频| 狠狠综合久久AV一区二区三区 | 久久人妻内射无码一区三区| 亚洲综合国产一区二区三区| 亚洲一区日韩高清中文字幕亚洲| 日本一区二区三区不卡视频中文字幕| 美女视频一区三区网站在线观看| 日韩免费一区二区三区在线播放| 精品不卡一区二区| 亚洲AV无码国产一区二区三区 | 福利电影一区二区| 国产suv精品一区二区6| 日韩精品一区二区三区视频 | 精品人妻系列无码一区二区三区 | 久久亚洲一区二区| 国产91久久精品一区二区| 成人免费观看一区二区| 欧洲精品一区二区三区| 国产天堂在线一区二区三区| 国产成人一区在线不卡| 无码AV中文一区二区三区| 波多野结衣一区二区三区| 国产三级一区二区三区| 韩日午夜在线资源一区二区 | 国产精品视频一区二区三区不卡| 亚洲一区日韩高清中文字幕亚洲|