随笔分类 - html

页面骨架
摘要: http协议入门 包含什么 请求:报文格式(报头、正文、url)、请求方法、请求头 响应:状态码、消息报头、响应正文 FAQ常见问题 常见请求头:User-Agent Cookie Referrer 常见响应头:Content-Type Content-Length CAche 常见状态吗:1xx(信息)2xx(成功)3xx(重定向)4xx(客服端错误)5xx(服务器错误) 下面...阅读全文
posted @ 2017-11-04 14:48 model-zachary 阅读(6) | 评论 (0) 编辑
摘要: 1、Fullscreen 该API允许开发者以编程方式将Web应用程序全屏运行,使Web应用程序更像本地应用程序。 2、Page Visibility 该API可以用来检测页面对于用户的可见性,即返回用户当前浏览的页面或标签的状态变化。 3、getUserMedia 该API允许Web应用程序访问摄阅读全文
posted @ 2017-11-01 17:33 model-zachary 阅读(9) | 评论 (0) 编辑
摘要: 很想知道你近况 我听人说 还不如你对我讲 经过那段遗憾 请你放心 我变得更加坚强 世界不管怎样荒凉 爱过你就不怕 我最亲爱的 你过的怎麼样 ...阅读全文
posted @ 2017-09-29 10:35 model-zachary 阅读(3) | 评论 (0) 编辑
摘要: 正向代理 反向代理阅读全文
posted @ 2017-09-12 12:26 model-zachary 阅读(12) | 评论 (0) 编辑
posted @ 2017-07-31 17:24 model-zachary 阅读(7) | 评论 (0) 编辑
摘要: ***注意 如果 vim 后面跟着不存在或者打错了的文件 会自动生成带一个带点缀的文件 持续更新阅读全文
posted @ 2017-06-15 23:55 model-zachary 阅读(5) | 评论 (0) 编辑
摘要: 80端口 81端口 82端口 88端口 8888端口 8000端口 90端口 91端口 92端口 99端口 9090端口阅读全文
posted @ 2017-06-12 12:21 model-zachary 阅读(5) | 评论 (0) 编辑
摘要: function test(a){ console.log(a)}阅读全文
posted @ 2017-06-06 14:22 model-zachary 阅读(30) | 评论 (0) 编辑
摘要: 在 菜单 File>Settings>Directories 在下图中的右边 Add Content ROOT 添加文件夹 之后回到软件页面把project 改成project file 右键 菜单 shou in explorer 即可查看这个文件所在的文件夹位置阅读全文
posted @ 2017-05-31 17:41 model-zachary 阅读(7) | 评论 (0) 编辑
摘要: Ctrl+Y 迅速删除一整行 Ctrl+D 快速复制一整行 Alt+J 选择相同元素 Ctrl+Alt+L 格式化代码Ctrl+Shift+R 批量替换工程文件内的内容 Ctrl+Tab 窗口切换 Ctrl+Shift+N 通过文件名快速查找工程内的文件 Shift+Tab 缩进代码阅读全文
posted @ 2017-05-31 17:37 model-zachary 阅读(10) | 评论 (0) 编辑
摘要: &ltp&gt html &lt/p&gt &ltimg src=&quot&quot /&gt $('.draggable-element').arrangeable();阅读全文
posted @ 2017-05-21 18:36 model-zachary| 编辑
摘要: 给了浮动,去掉内容后,就乱掉了,是因为你没有给高height,只给了行高line-height 所以有具体宽高的盒子是最安全的阅读全文
posted @ 2017-05-15 15:20 model-zachary| 编辑
摘要: 点击关联复选框 input 其他类型也可以用label来关联 例如:type="radio"阅读全文
posted @ 2017-01-18 18:19 model-zachary 阅读(18) | 评论 (0) 编辑
摘要: 原理就是首先用js的createElement来创建,之后在使用 document.createElement('header'); 头部信息阅读全文
posted @ 2017-01-18 15:52 model-zachary 阅读(16) | 评论 (0) 编辑
摘要: HTTP的状态码 对于状态码大家如果经常在线买东西就能知道,我们买了东西就会有个订单状态:出库、发货中、送达中、送达等,其实这些状态就是状态码,只不过这些状态码都是文字。HTTP 响应的时候也有状态码,这样客户端才能知道请求成功 还是失败 ,如果失败就能通过状态码判断出为什么请求失败,下面是常用的状阅读全文
posted @ 2016-12-23 15:11 model-zachary 阅读(50) | 评论 (0) 编辑
摘要: meta:vp 快速生成 meta视口阅读全文
posted @ 2016-11-23 21:12 model-zachary 阅读(17) | 评论 (0) 编辑
摘要: ::-webkit-input-placeholder{ font-size:px2rem(36); } ::-webkit-input-placeholder{ font-size:px2rem(36); }阅读全文
posted @ 2016-11-23 21:05 model-zachary 阅读(7) | 评论 (0) 编辑
摘要: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ...阅读全文
posted @ 2016-11-23 20:58 model-zachary 阅读(7) | 评论 (0) 编辑

canvas

<!DOCTYPE html>  
<html>  
<head>  
    <meta charset="utf-8">  
    <meta http-equiv="X-UA-Compatible" content="IE=edge">  
    <title></title>  
</head>  
<body>  
    <div>  
        <canvas id="myCanvas" height="600px" width="1200px"></canvas>  
    </div>  
</body>  
</html> 

  

<script>  
    var mycanvas = document.getElementById('myCanvas');  
           var ctx = mycanvas.getContext("2d");  
           //流程块  
            function Can(ctx,Bolds,BorderColor,DistanceX,DistanceY,Widths,Hights,Bcolor,FontColor,FontS,Texts,textX,textY){  
                     //边框背景  
                ctx.beginPath();  
                ctx.lineWidth=Bolds;  
                ctx.strokeStyle=BorderColor;//边框颜色  
                ctx.rect(DistanceX,DistanceY,Widths,Hights);  
                ctx.fillStyle=Bcolor;//背景颜色  
                ctx.fill();  
                ctx.fillStyle=FontColor;//字体颜色  
                ctx.font = FontS;  
                ctx.fillText(Texts, textX, textY);  
                ctx.stroke();  
                ctx.closePath();  
           };  
           //字体  
           function Fon(FontS,Texts,textX,textY,color){  
                ctx.beginPath();  
                ctx.font = FontS;  
                ctx.fillStyle=color;  
                ctx.fillText(Texts, textX, textY);  
                ctx.stroke();  
                ctx.closePath();  
           }  
           //箭头  
            function drawArrow(ctx,fromX,fromY,toX,toY,theta,headlen,width,color) {  
           theta = typeof(theta) != 'undefined' ? theta : 30;  
           headlen = typeof(theta) != 'undefined' ? headlen : 10;  
           width = typeof(width) != 'undefined' ? width : 1;  
           color = typeof(color) != 'color' ? color : '#000'; // 计算各角度和对应的P2,P3坐标  
            var angle = Math.atan2(fromY - toY, fromX - toX) * 180 / Math.PI,  
                angle1 = (angle + theta) * Math.PI / 180,  
                angle2 = (angle - theta) * Math.PI / 180,  
                topX = headlen * Math.cos(angle1),  
                topY = headlen * Math.sin(angle1),  
                botX = headlen * Math.cos(angle2),  
                botY = headlen * Math.sin(angle2);  
                ctx.save();  
                ctx.beginPath();  
                var arrowX = fromX - topX;  
                var arrowY = fromY - topY;  
                ctx.moveTo(arrowX, arrowY);  
                ctx.moveTo(fromX, fromY);  
                ctx.lineTo(toX, toY);  
                arrowX = toX + topX;  
                arrowY = toY + topY;  
                ctx.moveTo(arrowX, arrowY);  
                ctx.lineTo(toX, toY);  
                arrowX = toX + botX;  
                arrowY = toY + botY;  
                ctx.lineTo(arrowX, arrowY);  
                ctx.strokeStyle = color;  
                ctx.lineWidth = width;  
                ctx.stroke();  
                ctx.restore();  
            };  
                Can(ctx,1,"#ccc",10,10,120,50,"#000","#fff","12pt Arial","流程1",40,40);  
                Can(ctx,1,"#ccc",280,10,120,50,"#000","#fff","12pt Arial","流程2",316,40);  
                Can(ctx,1,"#ccc",550,10,120,50,"#000","#fff","12pt Arial","流程3",570,40);  
                Can(ctx,1,"#ccc",820,10,120,50,"#000","#fff","12pt Arial","流程4",855,40);  
                Can(ctx,1,"#ccc",1090,10,120,50,"#000","#fff","12pt Arial","流程5",1104,40);  
                Can(ctx,1,"#ccc",1090,200,120,50,"#000","#fff","12pt Arial","流程6",1104,232);  
                Can(ctx,1,"#ccc",1090,380,120,50,"#ccc","#fff","12pt Arial","流程7",1104,410);  
                Can(ctx,1,"#ccc",820,380,120,50,"#ccc","#fff","12pt Arial","流程8",840,410);  
                Can(ctx,1,"#ccc",550,380,120,50,"#ccc","#fff","12pt Arial","流程9",570,410);  
                Can(ctx,1,"#ccc",280,380,120,50,"#ccc","#fff","12pt Arial","流程10",316,410);  
                Can(ctx,1,"#ccc",10,380,120,50,"#ccc","#fff","12pt Arial","流程11",40,410);  
                Can(ctx,1,"#ccc",550,200,120,50,"#ccc","#fff","12pt Arial","流程12",586,232);  
  
                //canvas环境,线X轴起点,线Y轴起点,旋转角度x,y,尖角,尖角,颜色  
              drawArrow(ctx,130,30,170,30,0,0,1,'green');  
              drawArrow(ctx,130,42,170,42,0,0,1,'blue');  
              drawArrow(ctx,240,30,280,30,30,10,1,'green');  
              drawArrow(ctx,240,42,280,42,30,10,1,'blue');  
              //字  
              Fon("12pt Arial","李大钊",180,30,"green");  
              Fon("12pt Arial","陈独秀",180,60,'red');  
</script>  

  

posted @ 2018-06-14 15:39  小沐雨  阅读(187)  评论(0编辑  收藏  举报