国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當(dāng)前位置: 首頁 > news >正文

php網(wǎng)站文件下載怎么做seo搜索引擎優(yōu)化教程

php網(wǎng)站文件下載怎么做,seo搜索引擎優(yōu)化教程,制作wordpress模板教程視頻教程,網(wǎng)站建設(shè)騙局寫在前面 關(guān)于微信小程序?qū)Ш綑诘膯栴}以及解決辦法我已經(jīng)在先前的文章中有提到,點(diǎn)擊下面的鏈接即可跳轉(zhuǎn)~ 🤏微信小程序自定義的導(dǎo)航欄🤏 在這篇文章中我們需要做一個(gè)這樣的導(dǎo)航欄!先上效果圖 👇👇&#x1f…

寫在前面

關(guān)于微信小程序?qū)Ш綑诘膯栴}以及解決辦法我已經(jīng)在先前的文章中有提到,點(diǎn)擊下面的鏈接即可跳轉(zhuǎn)~
🤏微信小程序自定義的導(dǎo)航欄🤏

在這篇文章中我們需要做一個(gè)這樣的導(dǎo)航欄!先上效果圖
👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇
請(qǐng)?zhí)砑訄D片描述
這個(gè)導(dǎo)航欄是codepen上的大神寫的,但是它是用前端三件套(即html\css\js)來完成的,在微信小程序原生語法中有很多地方是不支持一些特性的,比如它里面的js核心用到了gsap動(dòng)畫庫,而微信小程序是不支持的! 除此之外還有html與wxml、css與wxss轉(zhuǎn)換的問題。總之假如直接復(fù)制粘貼是完全行不通的!
(https://codepen.io/v_Bauer/pen/WNroMOq)


最終效果展示

請(qǐng)?zhí)砑訄D片描述


全部代碼

在這里將會(huì)分為兩個(gè)部分,即codepen上的原版和微信小程序版本
注:微信小程序的引用了外部組件庫Vant中的ICON、以及自制的LOADING組件()

codepen

??HTML??

<html><head><meta charset="utf-8"><title></title><meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div id="navbarContainer"><div id="navbar"><div id="bubbleWrapper"><div id="bubble1" class="bubble"><span class="icon"><i class="fas fa-home"></i></span></div><div id="bubble2" class="bubble"><span class="icon"><i class="fab fa-twitter"></i></span></div><div id="bubble3" class="bubble"><span class="icon"><i class="fas fa-bell"></i></span></div><div id="bubble4" class="bubble"><span class="icon"><i class="fas fa-user"></i></span></div></div><div id="menuWrapper"><div id="menu1" class="menuElement" onclick="move('1', '50px', '#ffcc80')"><i class="fas fa-home"></i></div><div id="menu2" class="menuElement" onclick="move('2', '150px', '#81d4fa')"><i class="fab fa-twitter"></i></div><div id="menu3" class="menuElement" onclick="move('3', '250px', '#c5e1a5')"><i class="fas fa-bell"></i></div><div id="menu4" class="menuElement" onclick="move('4', '350px', '#ce93d8')"><i class="fas fa-user"></i></div></div></div><div id="bgWrapper"><div id="bg"></div><div id="bgBubble"></div></div>
</div><!--   <svg width="0" height="0" ><defs><filter id="goo"><feGaussianBlur in="SourceGraphic" stdDeviation="20" result="blur" id="blurFilter"/><feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 30 -15" result="goo" /><feComposite in="SourceGraphic" in2="goo" operator="atop"/></filter></defs></svg> --></body></html>

??CSS💕


body {background: #37474f;width: 100vw;height: 100vh;display: flex;justify-content: center;align-items: center;margin: 0;overflow: hidden;
}#navbarContainer{width: 400px;min-width: 400px;height: 70vh;background-color: #ffcc80;border-radius: 20px;display: flex;justify-content: flex-end;flex-direction: column;overflow: hidden;position: relative;box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}#navbar{width: 100%;height: 60px;background-color: #fff;position: absolute;
}#bubbleWrapper{position: absolute;display: flex;justify-content: space-around;width: 100%;bottom: 25px;
}.bubble{background-color: #fff;width: 50px;height: 50px;bottom: 85px;border-radius: 50%;z-index: 1;transform: translateY(120%);display: flex;justify-content: center;align-items: center;
}
.icon{opacity: 0;
}#bubble1{transform: translateY(0%);box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);> span{opacity: 0.7;}
}#bgWrapper{filter: url(#goo);width: 100%;height: 100px;position: absolute;bottom: 60px;
}
#bg{background-color: #ffcc80;width: 120%;height: 100%;margin-left: -10%;
}
#bgBubble{position: absolute;background-color: #ffcc80;width: 70px;height: 70px;border-radius: 50%;bottom: -50px;left: 50px;transform: translateX(-50%);
}#menuWrapper{position: absolute;width: 100%;display: flex;justify-content: space-around;
}.menuElement{opacity: 0.4;transform: translateY(100%);cursor: pointer;&:hover{opacity: 0.5;}
}#contentWrapper{position: absolute;top: 50%;width: 100%;transform: translateY(-50%);display: flex;justify-content: center;align-items: center;h2{color: #fff;font-family: sans-serif;font-weight: 400;}
}
.content{display: none;opacity: 0;
}

💕JS💕

 function move(id, position, color) {var tl = gsap.timeline();tl.to("#bgBubble", {duration: 0.15, bottom: "-30px", ease: "ease-out"}, 0).to("#bubble1", {duration: 0.1, y: "120%", boxShadow: 'none', ease: "ease-out",}, 0).to("#bubble2", {duration: 0.1, y: "120%", boxShadow: 'none', ease: "ease-out",}, 0).to("#bubble3", {duration: 0.1, y: "120%", boxShadow: 'none', ease: "ease-out",}, 0).to("#bubble4", {duration: 0.1, y: "120%", boxShadow: 'none', ease: "ease-out",}, 0).to(".icon", {duration: 0.05, opacity: 0, ease: "ease-out",}, 0).to("#bgBubble", {duration: 0.2, left: position, ease: "ease-in-out"}, 0.1).to("#bgBubble", {duration: 0.15, bottom: "-50px", ease: "ease-out"}, '-=0.2').to(`#bubble${id}`, {duration: 0.15, y: "0%", opacity: 1, boxShadow: '0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24)', ease: "ease-out"}, '-=0.1').to(`#bubble${id}> span`, {duration: 0.15, y: "0%", opacity: 0.7, ease: "ease-out"}, '-=0.1').to("#navbarContainer", {duration: 0.3, backgroundColor: color, ease: "ease-in-out"}, 0).to("#bg", {duration: 0.3, backgroundColor: color, ease: "ease-in-out"}, 0).to("#bgBubble", {duration: 0.3, backgroundColor: color, ease: "ease-in-out"}, 0)}

wx_miniprograme

??WXML??

<!-- index.wxml -->
<navigation-bar title="僑韻潮繪" back="{{false}}" color="black" background="#FFF" class="nav"></navigation-bar>
<my-loading showLoading="{{isLoading}}" class="loading"></my-loading>
<!-- 導(dǎo)航欄 -->
<view id="navbarContainer" animation="{{navbarContainerAnimation}}"><view id="navbar"><view id="bubbleWrapper"><view id="bubble1" class="bubble" animation="{{bubble1Animation}}"><span class="icon" animation="{{icon1Animation}}"><van-icon name="location-o" size="25px" /></span></view><view id="bubble2" class="bubble" animation="{{bubble2Animation}}"><span class="icon" animation="{{icon2Animation}}"><van-icon name="contact-o" size="25px" /></span></view><view id="bubble3" class="bubble" animation="{{bubble3Animation}}"><span class="icon" animation="{{icon3Animation}}"><van-icon name="link-o" size="25px" /></span></view><view id="bubble4" class="bubble" animation="{{bubble4Animation}}"><span class="icon" animation="{{icon4Animation}}"><van-icon name="list-switch" size="25px" /></span></view></view><view id="menuWrapper"><view id="menu1" class="menuElement" bindtap="move" data-id="1" data-position="95rpx" data-color="#ffcc80"><van-icon name="location-o" size="20px" animation="{smallIcon1Animation}" /></view><view id="menu2" class="menuElement" bindtap="move" data-id="2" data-position="280rpx" data-color="#81d4fa"><van-icon name="contact-o" size="20px" animation="{smallIcon2Animation}" /></view><view id="menu3" class="menuElement" bindtap="move" data-id="3" data-position="467rpx" data-color="#c5e1a5"><van-icon name="link-o" size="20px" animation="{smallIcon3Animation}" /></view><view id="menu4" class="menuElement" bindtap="move" data-id="4" data-position="655rpx" data-color="#ce93d8"><van-icon name="list-switch" size="20px" animation="{smallIcon4Animation}" /></view></view></view><view id="bgWrapper"><view id="bg" animation="{{bgAnimation}}"></view><view id="bgBubble" animation="{{bgBubbleAnimation}}"></view></view>
</view>                 

??WXSS💕

/**index.wxss**/
page {height: 100vh;display: flex;flex-direction: column;
}.loading {position: absolute;z-index: 999;
}/* NAV-BAR樣式START */
.nav {z-index: 2;
}/* NAV-BAR樣式END *//* 導(dǎo)航欄的樣式  START*/
#navbarContainer {width: 100%;height: 90%;margin-bottom: 5rpx;background-color: #ffcc80;border-radius: 40rpx;display: flex;justify-content: flex-end;flex-direction: column;overflow: hidden;position: relative;box-shadow: 0 20rpx 20rpx rgba(0, 0, 0, 0.19), 0 12rpx 12rpx rgba(0, 0, 0, 0.23);
}#navbar {width: 100%;height: 120rpx;background-color: #fff;position: absolute;
}#bubbleWrapper {position: absolute;display: flex;justify-content: space-around;width: 100%;bottom: 50rpx;
}.bubble {background-color: #fff;width: 100rpx;height: 100rpx;border-radius: 50%;z-index: 1;transform: translateY(120%);display: flex;justify-content: center;align-items: center;
}.icon {opacity: 0;
}#bubble1 {transform: translateY(0%);box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}#bubble1 span {opacity: 0.7;
}#bgWrapper {filter: blur(3rpx);width: 100%;height: 200rpx;position: absolute;bottom: 120rpx;
}#bg {background-color: #ffcc80;width: 120%;height: 100%;margin-left: -10%;
}#bgBubble {position: absolute;background-color: #ffcc80;width: 140rpx;height: 140rpx;border-radius: 50%;bottom: -100rpx;left: 95rpx;transform: translateX(-50%);
}#menuWrapper {position: absolute;width: 100%;display: flex;justify-content: space-around;
}.menuElement {opacity: 0.4;transform: translateY(100%);cursor: pointer;
}#contentWrapper {position: absolute;top: 50%;width: 100%;transform: translateY(-50%);display: flex;justify-content: center;align-items: center;
}/* 導(dǎo)航欄的樣式END */

💕JS💕

// pages/index/index.js
Page({data: {checked: false,isLoading: false,bgBubbleAnimation: {},index: 1,},move: function (event) {// 接受點(diǎn)擊事件的參數(shù)var id = event.currentTarget.dataset.id;var position = event.currentTarget.dataset.position;var color = event.currentTarget.dataset.color;let that = this;// 創(chuàng)建背景泡泡動(dòng)畫-第一步var bgBubbleAnimation = wx.createAnimation({duration: 150,timingFunction: 'ease-out'});bgBubbleAnimation.bottom('-60rpx').step();// 創(chuàng)建背景泡泡動(dòng)畫-第二步var bgBubbleAnimation_second_step = wx.createAnimation({duration: 400,timingFunction: 'ease-in-out'});bgBubbleAnimation_second_step.left(position).step();// 創(chuàng)建背景泡泡動(dòng)畫-第三步var bgBubbleAnimation_third_step = wx.createAnimation({duration: 450,timingFunction: 'ease-out'});bgBubbleAnimation_third_step.bottom('-100rpx').step();// 連續(xù)執(zhí)行動(dòng)畫var promise = new Promise((resolve, reject) => {this.setData({bgBubbleAnimation: bgBubbleAnimation.export(),// isLoading: true});setTimeout(resolve, 50); // 等待第一步動(dòng)畫執(zhí)行完畢});var bubbleAnimations = [];var iconAnimations = [];promise.then(() => {return new Promise((resolve, reject) => {// 創(chuàng)建氣泡和圖標(biāo)動(dòng)畫for (var i = 1; i <= 4; i++) {var bubbleAnimation = wx.createAnimation({duration: 100,timingFunction: 'ease-out'});bubbleAnimation.translateY('120%').step();bubbleAnimations.push(`bubble${i}Animation`);that.setData({ [`bubble${i}Animation`]: bubbleAnimation.export() });var iconAnimation = wx.createAnimation({duration: 50,timingFunction: 'ease-out'});iconAnimation.opacity(0).step();iconAnimations.push(`icon${i}Animation`);that.setData({ [`icon${i}Animation`]: iconAnimation.export() });}this.setData({bgBubbleAnimation: bgBubbleAnimation_second_step.export(),});setTimeout(resolve, 100); // 等待第一步動(dòng)畫執(zhí)行完畢});}).then(() => {this.setData({bgBubbleAnimation: bgBubbleAnimation_third_step.export()});var clickBubbleAnimation = wx.createAnimation({duration: 1000,timingFunction: 'ease-out'});clickBubbleAnimation.translateY('0%').opacity(1).step();var clickBubbleSpanAnimation = wx.createAnimation({duration: 1000,timingFunction: 'ease-out'});clickBubbleSpanAnimation.opacity(0.7).step();that.setData({[bubbleAnimations[id - 1]]: clickBubbleAnimation.export(),[iconAnimations[id - 1]]: clickBubbleSpanAnimation.export()});// 更新導(dǎo)航欄和背景顏色動(dòng)畫var navbarContainerAnimation = wx.createAnimation({duration: 300,timingFunction: 'ease-out'});navbarContainerAnimation.backgroundColor(color).step();var bgAnimation = wx.createAnimation({duration: 300,timingFunction: 'ease-out'});bgAnimation.backgroundColor(color).step();var bgBubbleAnimation_final = wx.createAnimation({duration: 300,timingFunction: 'ease-out'});bgBubbleAnimation_final.backgroundColor(color).step();this.setData({navbarContainerAnimation: navbarContainerAnimation.export(),bgAnimation: bgAnimation.export(),bgBubbleAnimation: bgBubbleAnimation_final.export(),});}).catch((err) => {console.log(err);});}})

結(jié)束語

如果有疑問歡迎大家留言討論,你如果覺得這篇文章對(duì)你有幫助可以給我一個(gè)免費(fèi)的贊嗎?我們之間的交流是我最大的動(dòng)力!

http://m.aloenet.com.cn/news/40277.html

相關(guān)文章:

  • 貴陽市花溪區(qū)建設(shè)局網(wǎng)站百度sem是什么意思
  • 網(wǎng)站源碼防盜原理微信營銷的方法7種
  • 卡盟自助網(wǎng)站建設(shè)武漢網(wǎng)站推廣優(yōu)化
  • 洛陽設(shè)計(jì)公司官網(wǎng)seo兼職
  • h5制作軟件推薦菏澤資深seo報(bào)價(jià)
  • 網(wǎng)站維護(hù)優(yōu)化網(wǎng)絡(luò)推廣和信息流優(yōu)化一樣么
  • 超大型網(wǎng)站建設(shè)廣州新聞最新消息今天
  • 在58同城做網(wǎng)站怎么樣如何發(fā)布自己的html網(wǎng)站
  • iis7 網(wǎng)站權(quán)限黑帽seo技術(shù)有哪些
  • 網(wǎng)頁編成網(wǎng)站免費(fèi)的云服務(wù)器有哪些
  • 做精美ppt的網(wǎng)站可以免費(fèi)發(fā)布廣告的平臺(tái)有哪些
  • 漳州專業(yè)網(wǎng)站建設(shè)公司網(wǎng)絡(luò)營銷屬于什么專業(yè)類型
  • 網(wǎng)頁設(shè)計(jì)制作的流程seo優(yōu)化服務(wù)
  • 佛山網(wǎng)站建設(shè)服務(wù)公司什么搜索引擎搜索最全
  • 黃村網(wǎng)站開發(fā)公司電話東莞營銷型網(wǎng)站建設(shè)
  • b2c商城網(wǎng)站網(wǎng)站搜什么關(guān)鍵詞
  • 黃岐做網(wǎng)站網(wǎng)站建設(shè)技術(shù)托管
  • 宜昌網(wǎng)站推廣關(guān)鍵詞優(yōu)化怎么弄
  • 優(yōu)化企業(yè)網(wǎng)站標(biāo)題河北百度競價(jià)優(yōu)化
  • 備案網(wǎng)站制作北京百度關(guān)鍵詞推廣
  • 企業(yè)注冊(cè)在哪個(gè)網(wǎng)站申請(qǐng)網(wǎng)絡(luò)營銷的發(fā)展現(xiàn)狀及趨勢(shì)
  • 合肥公司網(wǎng)站建設(shè)搜索引擎優(yōu)化排名seo
  • 在上面網(wǎng)站上可以做統(tǒng)計(jì)圖今日深圳新聞最新消息
  • 長沙專業(yè)網(wǎng)站設(shè)計(jì)平臺(tái)高質(zhì)量軟文
  • 音樂外鏈網(wǎng)站網(wǎng)站推廣引流最快方法
  • 設(shè)計(jì)素材網(wǎng)站0百度認(rèn)證怎么認(rèn)證
  • 旅行社門店做網(wǎng)站嘛營銷文案
  • 推廣網(wǎng)站排名優(yōu)化seo教程福州seo優(yōu)化
  • 盤縣做會(huì)計(jì)兼職的網(wǎng)站愛站網(wǎng)關(guān)鍵詞密度
  • 做網(wǎng)站有效果嗎揚(yáng)州整站seo