一个js视差动画
发表于|更新于
|浏览量:
人生碌碌,竞短论长,却不道荣枯有数,得失难量。——《浮生六记》
分享一个js视差动画:https://codepen.io/isladjan/details/abdyPBw
滑动会出现各种动画效果,非常的好玩




相关推荐
2022-10-05
RainEffect
不要从你自己的口袋里掏出勋章借给你的朋友,这是侮辱他的——泰戈尔 分享一个真实的雨滴效果: https://tympanus.net/Development/RainEffect/#slide-1 github地址:https://github.com/codrops/RainEffect 还是非常炫酷的
2021-04-17
vue-router传参
生命是一张弓,那弓弦是梦想。——罗曼·罗兰 官网 之前我们配置过路由,这里就不多赘述如何配置了 我们聊聊如何传参 我们之前使用方式如下 1this.$router.push(page); 这里page为path,值为我们在router的index.js中配的/message/message 我们如果需要传参 则可以使用下面这种方式 123456789this.$router.push({ name: pageName, params: { userId: '123' }, query: { plan: 'private' }}); 注意这里pageName是我们在路由中配置的name而不再是path了,因为path和params一起用会导致params为空对象 按照我们上面写的,我们跳转到message页面去了 1234567891011121314151617<template> <div> {{$route.para...
2024-07-26
使用Console Importer安装lodash并使用
健康和才智是人生两大幸事。——米南德 我今天在逛lodash官方文档,用Console Importer仅需安装时 除了我们一般的使用方式也就是$i("lodash") 12345678$i("lodash")importer.js:2 [$i]: Searching for lodash, please be patient...undefinedimporter.js:2 [$i]: lodash not found, import lodash.js instead.importer.js:2 [$i]: lodash.js is loading, please be patient...importer.js:2 [$i]: lodash.js(https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js) is loaded._.camelCase('Foo Bar');'fooBar' 还可以直接Vue ...
2021-07-16
uniapp打电话
人不可能阻止指甲生长….同样的,人也不能压抑自己与生俱来的冲动!——吉良吉影 代码如下 123uni.makePhoneCall({ phoneNumber: '114' //仅为示例}); 同样拥有成功、失败和完成的回调 123456uni.makePhoneCall({ phoneNumber: '114' //仅为示例 ,success:res=>{ console.log(res); } ,fail:res=>{ console.log(res); } ,complete:res=>{ console.log(res); }});
2023-01-02
transition.style
我这个人走得很慢,但是我从不后退。——亚伯拉罕·林肯 分享一个网站https://www.transition.style 这个网站提供了transition的各种css动画效果,其github地址:https://github.com/argyleink/transition.css 可以直接选取你需要的动画效果,点击复制,右边还可以自定义时间、淡入淡出等
2023-08-25
js阻止默认事件踩坑
人这种卑鄙的东西,什么都会习惯的。——陀思妥耶夫斯基《罪与罚》 今天遇到一个问题,我想阻止浏览器默认的滚动事件,却阻止不了还一直报错 123456789101112131415161718192021<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title></head><body> <div style="height: 2000px;background:#888"> </div> <script> document.addEventL...
