-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94968be
commit b799925
Showing
207 changed files
with
49,492 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>ES6语法新规范</title> | ||
</head> | ||
<body> | ||
<h3>ES6语法规范</h3> | ||
<hr /> | ||
<h4>变量声明let</h4> | ||
<ol> | ||
<li>let命令:声明新的变量,且变量只在范围内生效!</li> | ||
<li>作用域重合的let声明各自独立生效!</li> | ||
<li>变量在使用之后声明,var报错undefined,let报错ReferenceError!</li> | ||
<li class="let">let声明必处于作用域首航,否则就是死域,报错ReferenceError!,即使变量之前被声明;</li> | ||
<li>let命令在声明之后,再次声明同一个变量会报错!</li> | ||
</ol> | ||
<hr /> | ||
<h4>变量生命const</h4> | ||
<ol> | ||
<li>const声明的变量是一个只读的变量,不会改变,初始值必须赋予!</li> | ||
<li>const声明的对象是可以赋予对象属性的!是可以push数据的!</li> | ||
<li>相当于const声明的对象是被冻结的,解冻使用Object.freeze({})方法!</li> | ||
<li>当对象是一个对象数组时,所有的对象也应该解冻!</li> | ||
</ol> | ||
</body> | ||
</html> | ||
<script> | ||
var b=2; | ||
(function(){ | ||
let b=1; | ||
})(); | ||
console.log(b);//返回b=2 | ||
for (let i=0;i<3;i++) { | ||
let i="你好,再见"; | ||
console.log(i);//输出三个你好再见 | ||
}; | ||
|
||
(function(){ | ||
//alert(b); | ||
//let b="bbbb";//报错ReferenceError | ||
})(); | ||
|
||
//var x=x;//不报错 | ||
//let x=x;//x is not defined; | ||
|
||
|
||
function aa(){ | ||
let a="3"; | ||
//var a="32";//报错 | ||
//let a="12121";//报错 | ||
console.log(a); | ||
} | ||
aa(); | ||
function bb(arr){ | ||
{let arr;}//不报错 | ||
// let arr; //报错 | ||
};bb(); | ||
|
||
|
||
|
||
//解冻对象本身 | ||
var constantize = (obj) => { | ||
Object.freeze(obj); | ||
Object.keys(obj).forEach( (key, i) => { | ||
if ( typeof obj[key] === 'object' ) { | ||
constantize( obj[key] ); | ||
console.log(obj[key]); | ||
} | ||
}); | ||
}; | ||
|
||
//应用 | ||
let [ac,bc,cc]=["你好","sb","再见"]; | ||
console.log(ac+bc+cc); | ||
|
||
// 自动解析 | ||
const [q,w]='你好';let {length :ll}="你好sb";console.log(ll);//4 | ||
console.log(q+w); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>canvas</name> | ||
<comment>Create By HBuilder</comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.pandora.projects.ui.MKeyBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.aptana.ide.core.unifiedBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.pandora.projects.ui.MKeyNature</nature> | ||
<nature>com.aptana.projects.webnature</nature> | ||
</natures> | ||
<filteredResources> | ||
<filter> | ||
<id>0</id> | ||
<name></name> | ||
<type>10</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.orFilterMatcher</id> | ||
<arguments> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-projectRelativePath-matches-false-false-bin</arguments> | ||
</matcher> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-projectRelativePath-matches-false-false-setting</arguments> | ||
</matcher> | ||
</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1521699950206</id> | ||
<name></name> | ||
<type>26</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-node_modules</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1521699950207</id> | ||
<name></name> | ||
<type>26</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-node_modules</arguments> | ||
</matcher> | ||
</filter> | ||
</filteredResources> | ||
</projectDescription> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<header> | ||
<script type="text/javascript" src="js/jQuery-2.1.4.js"></script> | ||
</header> | ||
<style> | ||
*{ | ||
padding: 0; | ||
margin: 0; | ||
} | ||
.box>img { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
.box{ | ||
position: absolute; | ||
left: 0; | ||
right: 0; | ||
top: 0; | ||
bottom: 0; | ||
z-index: 9999999; | ||
} | ||
</style> | ||
|
||
<body> | ||
<div class="box" style="border: 1px solid red;"> | ||
|
||
</div> | ||
<canvas id="myCanvas" style="border:1px solid #d3d3d3;"> | ||
Your browser does not support the HTML5 canvas tag. | ||
</canvas> | ||
|
||
<script> | ||
var c = document.getElementById("myCanvas"); | ||
c.width=$(document).width(); | ||
c.height=$(document).height(); | ||
var ctx = c.getContext("2d"); | ||
var img = new Image(); | ||
ctx.fillStyle = "#fff"; | ||
ctx.font = "30px Arial"; | ||
img.src = "img/d-04-bg.png"; | ||
img.onload = function() { | ||
ctx.drawImage(img, 0, 0, c.width, c.height); | ||
ctx.fillText("1", $(document).width() * 0.3, $(document).height() * 0.3); | ||
ctx.stroke(); | ||
}; | ||
|
||
var img1 = convertCanvasToImage(c); | ||
$('.box').append(img1); | ||
console.log(img1); | ||
|
||
function convertCanvasToImage(canvas) { | ||
var image1 = new Image(); | ||
image1.src = canvas.toDataURL("image/png"); | ||
return image1; | ||
} | ||
</script> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
@charset "utf-8"; | ||
/* CSS Document */ | ||
/* | ||
* 奇酷互联网络科技(深圳)有限公司 CSS Library 2.0 | ||
* @desc 部分CSS样式使用CSS3 | ||
* Copyright(c) 2015 版权所有 奇酷互联网络科技(深圳)有限公司 | ||
* @desc DATE 2015-12-1 | ||
*/ | ||
|
||
/* | ||
* 将具有默认 html 取消浏览器字号限制 | ||
* @overlay * | ||
* @desc 在手持设备或webkit中不会解析12px以下字体 | ||
*/ | ||
html,body { | ||
width:100%; | ||
height:100%; | ||
min-width: 320px; | ||
min-height:480px; | ||
-ms-text-size-adjust: 100%; | ||
-webkit-text-size-adjust: 100%; | ||
/*-webkit-tap-highlight-color: #ffe5cc;*/ | ||
} | ||
/* Global 常用标签_@Start */ | ||
/* | ||
* 基本标签默认样式取消 | ||
* @overlay HTML标签 | ||
* @desc 取消基本标签默认样式,防止不同浏览器显示效果不同 | ||
* @Prop text-align:center; 解决不同浏览器剧中问题 | ||
*/ | ||
body,div,span,dl,dd,h1,h2,h3,h4,h5,h6,p,form,ul,ol,input{ | ||
margin:0 auto; | ||
padding:0; | ||
} | ||
body{ | ||
color:#666; | ||
font: 14px/1.5 "Hiragino Sans GB","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif; | ||
position: relative; | ||
} | ||
/* | ||
* 标签属性 | ||
* @overlay select | ||
* @desc 默认设置select效果 | ||
*/ | ||
select{ | ||
font-size:14px; | ||
outline:none; | ||
color:#666; | ||
} | ||
/* | ||
* 标签属性 | ||
* @overlay textarea | ||
* @desc 默认设置textarea效果 | ||
*/ | ||
textarea,input { | ||
color:#666; | ||
font-size:14px; | ||
word-wrap:break-word; | ||
word-break:break-all; | ||
box-sizing: border-box; | ||
outline:none; | ||
font-family: "宋体"; | ||
} | ||
|
||
/* | ||
* 标签属性 | ||
* @overlay input | ||
* @desc 去掉IE10文本框上的清除按钮 | ||
*/ | ||
input::-ms-clear{display:none;} | ||
input[type='text'],input[type='password']{ | ||
color:#666; | ||
border:1px solid #ccc; | ||
} | ||
input[type='buttom']{ | ||
border:none; | ||
} | ||
/* | ||
* 标签属性 | ||
* @overlay table td th | ||
* @desc 强制输入时内容超出时换行 | ||
*/ | ||
table { | ||
width:100%; | ||
border-collapse:collapse; | ||
} | ||
td,th{font-size:12px;} | ||
/* | ||
* 清除列表标记的样式 | ||
* @overlay ul,ol,li | ||
* @desc ul,ol,li列表更多的用在不需要列表前置符号的样式里 | ||
*/ | ||
ul,ol{list-style-type:none;} | ||
/* | ||
* 定义图片边框 | ||
* @overlay img | ||
* @desc 去除边框及图片底产无缘无故多出3px | ||
*/ | ||
img{ | ||
border:none; | ||
vertical-align: top; | ||
-ms-interpolation-mode: bicubic; | ||
} | ||
/* | ||
* 定义默认的链接样式 | ||
* @overlay a | ||
* @desc 仅仅是作为默认样式提供,可以在各自的实例中覆盖掉 | ||
*/ | ||
|
||
a{ | ||
color: #666; | ||
text-decoration:none; | ||
outline: none; | ||
} | ||
a:hover{ | ||
text-decoration:none; | ||
} | ||
a:active,a:focus { | ||
outline: none; | ||
} | ||
/* 去掉链接的虚线框*/ | ||
|
||
/* | ||
* 定义H系列标签 | ||
* @overlay HN | ||
* @desc 覆盖H系列标签默认属性 | ||
*/ | ||
h1{font-size:28px;} | ||
h2{font-size:25px;} | ||
h3{font-size:22px;} | ||
h4{font-size:20px;} | ||
h5{font-size:18px;} | ||
h6{font-size:14px;} | ||
/* | ||
* 定义其他标签 | ||
* @overlay em,i,b,strong | ||
*/ | ||
dfn,em,i,b,strong { | ||
font-style:normal; | ||
font-weight:normal; | ||
} | ||
.line { | ||
display: block; | ||
width: 100%; | ||
font-size: 0; | ||
height: 0px; | ||
line-height: 0px; | ||
border-top: 1px solid #DDDDDD; | ||
border-bottom: 1px solid #FFFFFF; | ||
} | ||
/* @Global 常用标签_@end */ | ||
|
||
/* @group 通用属性定义_@Start */ | ||
/* 鼠标样式 */ | ||
.pointer{cursor:pointer;} | ||
/* | ||
* 字母和单词换行设置 | ||
* @class Break 强制内容换行 | ||
* @class Nobreak 强制内容不换行 | ||
*/ | ||
.Break{word-break:break-all;word-wrap:break-word;} | ||
.Nobreak{word-break:keep-all;word-wrap:normal;} | ||
/* | ||
* 浮动定义 | ||
*/ | ||
.fl{float:left;} | ||
.fr{float:right;} | ||
|
||
/* @group 通用属性定义_@end */ | ||
|
||
/* @group 隐藏元素_@Start */ | ||
.o-hidden{overflow:hidden;} | ||
.invisible{visibility:hidden;} | ||
.hidden{display: none;} | ||
.block {display:block;} | ||
/* @group 隐藏元素_@end */ | ||
|
||
/* | ||
* 备注 | ||
*/ | ||
|
||
/* | ||
* 在终极页面中调用该通用样式时,应该注意显示效果的不同,因为后台上传信息时编辑器里面样式并没有调用本默认样式表. | ||
* 所以在编辑器中标签会有默认的属性,用户在添加信息时,这些信息都是附带默认样式的. | ||
* 如果用我们在终极页面也调用本默认CSS文件的话,许多标签如:p,td,li......标签默认样式都被取消,因此显示效不同. | ||
* | ||
* 解决办法: | ||
* 在终极页面显示内容区域还原这些标签的默认属性. | ||
* 版权所有 奇酷互联网络科技(深圳)有限公司 | ||
*/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.