
html
a-shitou
这个作者很懒,什么都没留下…
展开
-
canvas 小球碰撞
试着用面向对象的方式用canvas去实现一些东西, 主要代码 function Bubble() {}; //构造函数 Bubble.prototype = { init: function () { //基本配置 this.x = random(0, w); //小球x轴初始位置 this.y = random(0...原创 2019-06-17 18:51:51 · 803 阅读 · 0 评论 -
ES6写法小试
试一试Promise,好像挺不错的东西 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <script> ...原创 2019-06-17 14:14:27 · 324 阅读 · 0 评论 -
vue中用纯css 做一个六边形 类似蜂窝形的功能导航主菜单
之前认识不足以为纯css无法做出这种效果,用canvas画了一个,文章是这个 https://blog.youkuaiyun.com/shishuwei111/article/details/92611313 最近了解到css也可以做出来这样的效果 效果图 主要用了css的clip-path,有需要的可以了解以下这个属性,确实是个不可思议的东西 源码 <template> ...原创 2019-07-11 10:50:55 · 3191 阅读 · 0 评论 -
css 响应式布局
html{ font-size: calc(100vw/50); } .robot-index-head, .robot-index-main .robot-index-footer { height: 4rem; width: 100%; } .robot-index-head { line-height: 4rem; } .robot-index-head img { ...原创 2019-08-05 20:29:45 · 189 阅读 · 0 评论 -
vue 封装console.log 小试
最近用vue和Cordova组合写android应用,调式是经常用console.log打写log, 今天试试封装一下,便于调试 效果这样 代码如下 mian.js import globalUtils from './utils/globalUtils' Vue.use(globalUtils) globalUtils.js export default { ins...原创 2019-08-10 14:40:01 · 2821 阅读 · 0 评论 -
vue中使用crypto-js获得七牛云token
const CryptoJS = require('crypto-js') let timestamp = new Date().getTime() // 当前的时间戳 timestamp = parseInt(timestamp / 1000) + 36000 let putPolicy = {'scope': 'img_bucket1', 'deadline': timestamp} con...原创 2019-09-03 10:25:39 · 1473 阅读 · 2 评论