- 博客(7)
- 收藏
- 关注
原创 使用canvas将图片+文字转成base64格式的图片
var url = "car.png" //图片的路径 var img = new Image(); img.src = url; img.onload = function() { console.log(getBase64(img,'AAAA')); console.log(getBase64(img,'BBBB')) } function getBase64(img,t...
2019-06-20 10:26:14
1411
原创 react中glamor与react-resizable插件的使用
lodash moment classnames js-cookie glamor glamor是一款css-in-js的插件 github地址:https://github.com/threepointone/glamor Installation npm install glamor --save Usage 我所用到的是将style对象转化为类名字符串形式的部分: import Reac...
2019-05-17 18:16:38
1906
原创 textarea验证字数
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Document</title> <style type="text/css"> </style> </head> ...
2019-04-28 14:13:41
491
原创 父overflow子fixed IE兼容性问题
在写项目问题中,遇到一个IE11浏览器兼容问题: 父overflow: hidden;子position: fixed;,子溢出父的部分不显示 代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>ie兼容性测试</titl...
2019-04-23 10:18:37
361
转载 移动端h5页面监听手机横屏
var orientation; //页面加载时调用 orient(); //用户变化屏幕方向时调用 $(window).bind( 'orientationchange', function(e){ orient(); }); function orient() { if (window.orientation == 90 || window.orientation == -9...
2019-03-23 20:24:08
2698
原创 a标签锚点的跳转至非页面顶部
a标签锚点的跳转至非页面顶部 a标签锚点跳转永远是在页面顶部,如果上方有固定定位的元素,固定定位的元素会压盖住锚点跳转过来的元素,使用以下代码,模拟锚点跳转 // An highlighted block var fixedNavHeight = $('.nav-bar').outerHeight(); if (window.location.hash.indexOf('#') >= 0) ...
2019-03-23 20:19:39
1219
原创 解决谷歌浏览器会自动填充密码的问题
解决谷歌浏览器会自动填充密码的问题 可以在不需要默认填写的input框中设置 autocomplete=“new-password”,如下 <Input type="password" placeholder='请输入密码' autoComplete="new-password" /> ...
2019-03-07 12:26:25
4714
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅