前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【布局和界面】鼠标悬停动物显示和隐藏动画特效源码库

【布局和界面】鼠标悬停动物显示和隐藏动画特效源码库

作者头像
用户5997198
发布2020-05-18 15:23:06
1.1K0
发布2020-05-18 15:23:06
举报
文章被收录于专栏:蚂蚁开源社区

源码介绍:

这是一款基于vuejs的鼠标悬停动物显示和隐藏动画特效。该特效使用vuejs来编写,在鼠标悬停到卡片上面时,会有一只指定的小狗从卡片下冒出来,非常炫酷和可爱。

演示截图:

代码简释:

在HTML文件中引入。

引入CSS:

代码语言:javascript
复制
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css">
<link rel="stylesheet" href="./style.css">

引入JS:

代码语言:javascript
复制
<script src='https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js'></script>
<script src="./script.js"></script>

HTML部分:

代码语言:javascript
复制
<h1>基于vuejs的鼠标悬停动物显示和隐藏动画特效 <span>Mochi Shiba (vuejs, svg, css, cute)</span></h1>
<div class="htmleaf-links">
<a class="htmleaf-icon icon-htmleaf-home-outline" href="http://www.zzfriend.com/" title="蚂蚁开源社区" target="_blank"><span> 蚂蚁开源社区</span></a>
<a class="htmleaf-icon icon-htmleaf-arrow-forward-outline" href="http://bbs.zzfriend.com/forum.php?mod=forumdisplay&fid=43" title="返回下载页" target="_blank"><span> 返回下载页</span></a>
</div>
</header>
<h1>MOCHISHIBA</h1>
<p class="sub">These loyal Shiba Inu are fully cute!</p>
<main id=app>
<mochi-box shiba="ume" mood="happy" blush left-eye="laugh" right-eye="laugh" left-ear="down" right-ear="down">
<h2>うめ</h2>
<h3>
<a target="_blank" href="">Plum</a>
</h3>
<p class="shop kotobuki" title="kotobuki">ことぶき米店</p>
</mochi-box>
<mochi-box shiba="sesame" mood="drool" left-ear="up" right-ear="up">
<h2>ごま</h2>
<h3>
<a target="_blank" href="">Sesame</a>
</h3>
<p class="shop kotobuki" title="kotobuki">ことぶき米店</p>
</mochi-box>
<mochi-box shiba="tuna" mood="" left-ear="up" right-ear="middle">
<h2>つな</h2>
<h3>
<a target="_blank" href="">Tuna</a></h3>
<p class="shop kotobuki" title="kotobuki">ことぶき米店</p>
</mochi-box>
<mochi-box shiba="okaka" pop mood="excited" left-ear="up" right-ear="flat">
<h2>おかか</h2>
<h3>
<a target="_blank" href="">Okaka</a></h3>
<p class="shop kotobuki" title="kotobuki">ことぶき米店</p>
</mochi-box>
<mochi-box shiba="random">
<h2>おどろき</h2>
<h3>Random</h3>
<button>Randomize()</button>
</mochi-box>
<br>
<mochi-box shiba="anko" mood="cheeky" left-eye="open" right-eye="laugh" left-ear="flat" right-ear="middle">
<h2>あんこ</h2>
<h3>
<a target="_blank" href="o">Sweet Bean</a>
</h3>
<p class="shop uemachi" title="uemachi">うえまち団子</p>
</mochi-box>
<mochi-box shiba="kinako" mood="gleam" blush left-eye="open" right-eye="open" left-ear="middle" right-ear="middle">
<h2>きなこ</h2>
<h3>
<a target="_blank" href="">Kiwi</a>
</h3>
<p class="shop uemachi" title="uemachi">うえまち団子</p>
</mochi-box>
<mochi-box shiba="sakura" mood="cute" blush left-eye="shy" right-eye="open" left-ear="down" right-ear="middle">
<h2>さくら</h2>
<h3>
<a target="_blank" href="">Sakura</a>
</h3>
<p class="shop uemachi" title="uemachi">うえまち団子</p>
</mochi-box>
<mochi-box shiba="monaka" mood="content" left-eye="open" right-eye="wink" left-ear="middle" right-ear="flat">
<h2>もなか</h2>
<h3>
<a target="_blank" href="">Monaka</a>
</h3>
<p class="shop uemachi" title="uemachi">うえまち団子</p>
</mochi-box>
</main>
</div>
本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2020-05-15,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 蚂蚁大喇叭 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档