久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

您的位置:首頁技術(shù)文章
文章詳情頁

Vue實(shí)現(xiàn)PC端靠邊懸浮球的代碼

瀏覽:4日期:2023-01-22 11:57:25

我想把退出登錄的按鈕做成一個懸浮球的樣子,帶動畫的那種。

實(shí)現(xiàn)是這個樣子:

手邊沒有球形圖。隨便找一個,功能這里演示的為單機(jī)懸浮球注銷登錄

Vue實(shí)現(xiàn)PC端靠邊懸浮球的代碼

Vue實(shí)現(xiàn)PC端靠邊懸浮球的代碼

嗯,具體代碼:

<div :@mouseleave='uploadleave' @mouseenter='uploadenter' v-if='uploadShow' @click.stop='logout' > <img :src='http://www.baoyu77737.com/bcjs/require(’@/assets/1.png’)'/> </div>

data

uploadShow: false, uploadflag: true,

js方法

uploadenter() { this.uploadflag = true; }, uploadleave() { this.uploadflag = false; }, uploadanimated() { setTimeout(() => { this.uploadShow = true; setTimeout(() => { this.uploadleave(); }, 1000); }, 1000); },

css

.off{ -webkit-animation:1s seconddiv; background: transparent; } @keyframes seconddiv{ 0% {transform: scale(1.4,1.4);} 10% {transform: scale(1,1);} 25% {transform: scale(1.2,1.2);} 50% {transform: scale(1,1);} 70% {transform: scale(1.2,1.2);} 100% {transform: scale(1,1);} } .meun-switch { position: fixed; top: 90px; left: 0px; z-index: 2001; cursor: pointer; width: 150px; height: 150px; padding: 5px; transition: all 0.25s; &.leave { left: -65px; } &.active { left: 0; } &:hover { transform: scale(1.02); } img { width: 120px; height: 120px; } }

總結(jié)

到此這篇關(guān)于Vue實(shí)現(xiàn)PC端靠邊懸浮球的代碼的文章就介紹到這了,更多相關(guān)Vue靠邊懸浮球內(nèi)容請搜索好吧啦網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持好吧啦網(wǎng)!

標(biāo)簽: Vue
相關(guān)文章:
主站蜘蛛池模板: 大城县| 西充县| 万安县| 湖北省| 乃东县| 沛县| 紫金县| 德钦县| 达州市| 漳平市| 横峰县| 乐清市| 谢通门县| 来安县| 临江市| 潮安县| 汾阳市| 永新县| 贞丰县| 富裕县| 垫江县| 固原市| 宝山区| 渑池县| 罗平县| 额济纳旗| 怀远县| 驻马店市| 枣庄市| 沂源县| 汶上县| 阜宁县| 灵丘县| 沂水县| 穆棱市| 阳曲县| 谢通门县| 天台县| 玉龙| 武鸣县| 鹿泉市|