マウスカーソルをポインターみたいなドットにする「vue-cursor-fx」
by kabanoki
HTML
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@luxdamore/[email protected]/dist/CursorFx.css">
<script src="https://cdn.jsdelivr.net/npm/@luxdamore/[email protected]/dist/CursorFx.umd.min.js"></script>
<div id="app">
<cursor-fx color-hover="f00"></cursor-fx>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@luxdamore/[email protected]/dist/CursorFx.umd.min.js"></script>
CSS
body {
padding: 20px;
font-family: Helvetica;
}
#app {
background: #fff;
border-radius: 4px;
padding: 20px;
transition: all 0.2s;
}
li {
margin: 8px 0;
}
h2 {
font-weight: bold;
margin-bottom: 15px;
}
del {
color: rgba(0, 0, 0, 0.3);
}
Vue
const CursorFx = window['CursorFx'].CursorFx;
Vue.component(
CursorFx.name,
CursorFx
);
new Vue({
el: '#app'
});