随身笔记
随身笔记

前端资源

前端资源

Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted

大概意思呢就是:一个有设置cancelable=false的touchmove事件和其他某个滚动的操作冲突了。 我们只需要将滑动报错的标签上加上一个样式即可 touch-action: none; touch-action :当你触摸并按住触摸目标时候,禁止或显示系统默认菜单。 touch-action取值有一下两…

   1,201   2021-04-20   去围观

js base64图片压缩

js 图片 压缩 图片 js function dealImage(base64, w, callback) { var newImage = new Image(); var quality = 0.6; //压缩系数0-1之间 newImage.src = base64; newImage.setAttribute("crossOrigin", 'Anonymous'); //url为外域时需要 …

   1,304   2021-04-09   去围观

解决:出现滚动条背景无法平铺问题

<!doctype html> <html> <head> <meta charset="utf-8"> <title></title> <style> div { width: 400px; overflow-x: scroll; border: 1px solid #e6e6e6…

   576   2021-03-26   去围观

解决js计算数字精度问题

  function twofloat(v){ return Number((Number(v).toFixed(2)).toString()) //有小数保留,没小数就不用默认显示.00,多位小数就保留2位,同时解决精度问题 } console.log( twofloat(0.3-0.1) ) ------------------------------------------------- con…

   1,006   2021-03-15   去围观

vue.js分页

<script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.0/vue.min.js"></script> <style> .mo-paging { display: inline-block; padding: 0; margin: 1rem 0; …

   603   2021-02-02   去围观
加载更多