2018年10月10日

阿里云服务器新手安装nginx

摘要: 1.域名购买之后 备案。 2.购买服务器。 3.这两个条件具备之后进行下一步。 本人使用Mac ,实践流程按照Mac本的流程操作。 作为初学者,简配的服务器, 实例类型: I/O优化,操作系统: CentOS 7.4 64位 nginx 1.10 ps:为了将本地文件传到服务器,下载filezill 阅读全文

posted @ 2018-10-10 10:54 myYouth 阅读(5380) 评论(3) 推荐(0) 编辑

2018年9月13日

基于react+如何搭建一个完整的前端框架(1)

摘要: 1.使用 create-react-app 快速构建 React 开发环境 create-react-app 是来自于 Facebook,通过该命令我们无需配置就能快速构建 React 开发环境。 create-react-app 自动创建的项目是基于 Webpack + ES6 。 执行以下命令创 阅读全文

posted @ 2018-09-13 12:16 myYouth 阅读(1361) 评论(0) 推荐(0) 编辑

2018年6月14日

基于canvas绘图 缩放 做标记

摘要: 技术要点: 1.img 绘制到canvas 2.绘制完成以后进行拖拽,缩放 3.使用canvas画图,在绘制的img上进行标记划线,当然可以实现跟过功能,例如百度地图的功能,做单个标记,区域标记等。 4.实现坐标等转换,标记区域的所有坐标都是基于相对原始图片的坐标,便于其他操作。 实际项目中的开发实 阅读全文

posted @ 2018-06-14 16:29 myYouth 阅读(1940) 评论(8) 推荐(2) 编辑

2017年12月26日

echarts3.0 实例容器不实时更新页面的问题

摘要: var instanceId = document.getElementById(option.echartId).getAttribute('_echarts3_instance_'); if (instanceId) { var myInstance = option.echarts3.getI 阅读全文

posted @ 2017-12-26 13:12 myYouth 阅读(1385) 评论(0) 推荐(0) 编辑

2017年4月13日

获取URL地址栏参数(正则表达式)

摘要: /** * 获取地址栏参数 * @method queryURLParameter * @param {url:不传默认是当前locationhref ,isEncoded:是否是加密,不加密false,加密需要解密:true} * @return {参数对象} * eg:https://i.cnb 阅读全文

posted @ 2017-04-13 10:33 myYouth 阅读(828) 评论(0) 推荐(0) 编辑

2017年3月23日

js拖拽

摘要: <!doctype html><html lang="en"><head> <meta charset="UTF-8"> <title>darg</title> <style type="text/css"> .login_title { cursor: move; position: absolu 阅读全文

posted @ 2017-03-23 15:59 myYouth 阅读(274) 评论(0) 推荐(0) 编辑

2017年3月22日

css正方形盒子 自适应

摘要: //说明:一个不设置宽高的盒子,如何成为一个正方形:为啥padding-top:30%,width:30%就可以呢 因为padding-left;padding-top:padding-right;padding-bottom:设置的百分比是按照父级元素的宽度定的,所有只要其中任何两个组合就,在再加 阅读全文

posted @ 2017-03-22 09:59 myYouth 阅读(1588) 评论(0) 推荐(0) 编辑

2017年3月21日

原生js 的ajax封装

摘要: /** * 封装ajax函数(包括跨域) * @method ajax * @param option :{type:"post" or "get" 请求方式,url:"url" 请求地址,data:object 请求参数,async:"true" 异步or“false”同步,success:fun 阅读全文

posted @ 2017-03-21 17:39 myYouth 阅读(283) 评论(0) 推荐(0) 编辑

2017年3月15日

正则符号解释

摘要: 字符描述 \ 将下一个字符标记为一个特殊字符、或一个原义字符、或一个 向后引用、或一个八进制转义符。例如,'n' 匹配字符 "n"。'\n' 匹配一个换行符。序列 '\\' 匹配 "\" 而 "\(" 则匹配 "("。 ^ 匹配输入字符串的开始位置。如果设置了 RegExp 对象的 Multilin 阅读全文

posted @ 2017-03-15 12:30 myYouth 阅读(400) 评论(0) 推荐(0) 编辑

2017年3月14日

原生js回到顶部

摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> .test{ background: #ff0000; width:100%; height: 5000px;; } . 阅读全文

posted @ 2017-03-14 18:33 myYouth 阅读(542) 评论(0) 推荐(0) 编辑

导航