国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

uniapp微信小程序設(shè)置開屏啟動動畫效果

這篇具有很好參考價值的文章主要介紹了uniapp微信小程序設(shè)置開屏啟動動畫效果。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

微信小程序開屏動畫,uni-app,微信小程序,小程序

效果預(yù)覽

?使用uniapp搭建的微信小程序,制作小程序啟動開屏動畫,主要使用css動畫屬性。主頁代碼過多這里就展示重要代碼片段。

開屏動畫代碼
<view v-if="showTransition" :style="{ background: color }" class="card"
			:class="{ active: transitionCompleted }">
			一起聽歌Pro
</view>
動畫執(zhí)行完成顯示的代碼
<view v-else class="pages" :style="{ background: color }">
</view>

js代碼

data() {
			return {
				transitionCompleted: false,
				showTransition :true,//
                color:linear-gradient(to top, #fff, #F9F871),
			}
		},
mounted() {
			setTimeout(() => {
				this.transitionCompleted = true;
				setTimeout(() => {
					this.showTransition = false;
				}, 0); // 調(diào)整顯示過渡頁面的時間
			}, 2000); // 調(diào)整動畫執(zhí)行的時間
		},

css代碼文章來源地址http://www.zghlxwxcb.cn/news/detail-772242.html

.card {
		position: relative;
		width: 100%;
		height: 100vh;
		background: mediumturquoise;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 25px;
		font-weight: bold;
		border-radius: 15px;
		cursor: pointer;
	}

	.card::before,
	.card::after {
		position: absolute;
		content: "";
		width: 20%;
		height: 20%;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 25px;
		font-weight: bold;
		background-color: #fff;
		transition: all 2s;
	}

	.card::before {
		top: 0;
		right: 0;
		border-radius: 0 15px 0 100%;
	}

	.card::after {
		bottom: 0;
		left: 0;
		border-radius: 0 100% 0 15px;
	}

	.card::before,
	.card::after {
		width: 100%;
		height: 100%;
		border-radius: 15px;
		animation: expand 2s;
	}

	@keyframes expand {
		0% {
			width: 10%;
			height: 10%;
			border-radius: 15px;
		}

		/*  25% {
	    width: 20%;
	    height: 20%;
	    border-radius: 15px;
	  } */
		100% {
			width: 100%;
			height: 100%;
			border-radius: 15px;
		}
	}

	.card:after {
		content: "歡迎進入";
	}

到了這里,關(guān)于uniapp微信小程序設(shè)置開屏啟動動畫效果的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包