├── normalize.css-master ├── .gitignore ├── .travis.yml ├── .gitattributes ├── package-lock.json ├── .editorconfig ├── package.json ├── LICENSE.md ├── README.md ├── CHANGELOG.md ├── normalize.css └── CONTRIBUTING.md ├── CSS三角生成工具 ├── css │ ├── transparent.png │ ├── common.css │ ├── colorpicker.css │ └── layout.css ├── images │ ├── colorpicker_hex.png │ ├── colorpicker_hsb_b.png │ ├── colorpicker_hsb_h.png │ ├── colorpicker_hsb_s.png │ ├── colorpicker_indic.gif │ ├── colorpicker_rgb_b.png │ ├── colorpicker_rgb_g.png │ ├── colorpicker_rgb_r.png │ ├── colorpicker_select.gif │ ├── colorpicker_submit.png │ ├── colorpicker_overlay.png │ └── colorpicker_background.png ├── js │ ├── ga.js │ ├── eye.js │ ├── html5.js │ ├── utils.js │ └── css_triangle_generator.js └── index.html ├── javaScript高级笔记 ├── media │ ├── 06-1.png │ ├── 06-2.png │ ├── 作用域.jpg │ ├── 课程大纲.png │ ├── cookie.png │ ├── jszxgc.png │ ├── mxdxkf.png │ ├── EWWZBag.jpg │ ├── code-00.png │ ├── session.png │ ├── 引用类型的存储方式.png │ ├── 普通类型的存储方式.png │ ├── browser-js.png │ ├── java-script.jpg │ ├── js-dom-bom.png │ ├── 1496912475691.png │ ├── 1496915188338.png │ ├── 1496916239525.png │ ├── 1496981558575.png │ ├── 1497154623955.png │ ├── 1497165666684.png │ ├── 1497169919418.png │ ├── 1497317567484.png │ ├── 1497497605587.png │ ├── 1497497865969.png │ ├── 1497840546666.png │ ├── 1497840569051.png │ ├── 1498288494687.png │ ├── 1498288540967.png │ ├── 1498289626813.png │ ├── 1498700592589.png │ ├── 1498743207418.png │ ├── 1498743216279.png │ ├── 1498743269100.png │ ├── 1498743288621.png │ ├── Node.js_logo.svg.png │ ├── 构造函数-实例-原型之间的关系.png │ ├── 20160823024542444.jpg │ ├── 1497497605587-8288640195.png │ ├── 5f7b98babbb1fbdb7f99354940a1f65.jpg │ ├── 664ba37eeee9f4623c06c066867f1d38_r.jpg │ ├── Unofficial_JavaScript_logo_2.svg.png │ └── 9F437BB7-6844-4FC2-9C91-2D9648433DCA.png └── README.md ├── web前端最全笔记 ├── biji_files │ ├── sina.png │ ├── email.png │ ├── triangle.png │ ├── monokai.css │ ├── core.php │ ├── index.js.下载 │ ├── rainbow.min.js.下载 │ └── z_stat.php └── README.md ├── bootstrap ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 └── js │ └── npm.js ├── lib-flexible-2.0 ├── .gitignore ├── .editorconfig ├── index.min.js ├── package.json ├── index.js └── README.md ├── demo ├── js玫瑰.html └── js爱心.html ├── HTML笔记 ├── html5新增标签.md ├── 01-前言&WEB标准.md ├── 04-表格 table(会使用).md ├── 02-认识HTML.md ├── 05-列表和表单.md └── 03-HTML常用标签.md ├── PHP笔记 └── README.md ├── README.md ├── jQuery笔记 └── README.md ├── Web-API笔记 └── README.md ├── index.html └── JavaScript笔记 └── README.md /normalize.css-master/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /normalize.css-master/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - stable 4 | -------------------------------------------------------------------------------- /CSS三角生成工具/css/transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/CSS三角生成工具/css/transparent.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/06-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/06-1.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/06-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/06-2.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/作用域.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/作用域.jpg -------------------------------------------------------------------------------- /javaScript高级笔记/media/课程大纲.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/课程大纲.png -------------------------------------------------------------------------------- /web前端最全笔记/biji_files/sina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/web前端最全笔记/biji_files/sina.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/cookie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/cookie.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/jszxgc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/jszxgc.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/mxdxkf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/mxdxkf.png -------------------------------------------------------------------------------- /normalize.css-master/.gitattributes: -------------------------------------------------------------------------------- 1 | normalize.css linguist-vendored=false 2 | test.html linguist-vendored 3 | -------------------------------------------------------------------------------- /web前端最全笔记/biji_files/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/web前端最全笔记/biji_files/email.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/EWWZBag.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/EWWZBag.jpg -------------------------------------------------------------------------------- /javaScript高级笔记/media/code-00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/code-00.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/session.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/引用类型的存储方式.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/引用类型的存储方式.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/普通类型的存储方式.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/普通类型的存储方式.png -------------------------------------------------------------------------------- /web前端最全笔记/biji_files/triangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/web前端最全笔记/biji_files/triangle.png -------------------------------------------------------------------------------- /CSS三角生成工具/images/colorpicker_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/CSS三角生成工具/images/colorpicker_hex.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/browser-js.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/browser-js.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/java-script.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/java-script.jpg -------------------------------------------------------------------------------- /javaScript高级笔记/media/js-dom-bom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/js-dom-bom.png -------------------------------------------------------------------------------- /CSS三角生成工具/images/colorpicker_hsb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/CSS三角生成工具/images/colorpicker_hsb_b.png -------------------------------------------------------------------------------- /CSS三角生成工具/images/colorpicker_hsb_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/CSS三角生成工具/images/colorpicker_hsb_h.png -------------------------------------------------------------------------------- /CSS三角生成工具/images/colorpicker_hsb_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/CSS三角生成工具/images/colorpicker_hsb_s.png -------------------------------------------------------------------------------- /CSS三角生成工具/images/colorpicker_indic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/CSS三角生成工具/images/colorpicker_indic.gif -------------------------------------------------------------------------------- /CSS三角生成工具/images/colorpicker_rgb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/CSS三角生成工具/images/colorpicker_rgb_b.png -------------------------------------------------------------------------------- /CSS三角生成工具/images/colorpicker_rgb_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/CSS三角生成工具/images/colorpicker_rgb_g.png -------------------------------------------------------------------------------- /CSS三角生成工具/images/colorpicker_rgb_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/CSS三角生成工具/images/colorpicker_rgb_r.png -------------------------------------------------------------------------------- /CSS三角生成工具/images/colorpicker_select.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/CSS三角生成工具/images/colorpicker_select.gif -------------------------------------------------------------------------------- /CSS三角生成工具/images/colorpicker_submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/CSS三角生成工具/images/colorpicker_submit.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1496912475691.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1496912475691.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1496915188338.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1496915188338.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1496916239525.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1496916239525.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1496981558575.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1496981558575.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1497154623955.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1497154623955.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1497165666684.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1497165666684.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1497169919418.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1497169919418.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1497317567484.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1497317567484.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1497497605587.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1497497605587.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1497497865969.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1497497865969.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1497840546666.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1497840546666.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1497840569051.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1497840569051.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1498288494687.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1498288494687.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1498288540967.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1498288540967.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1498289626813.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1498289626813.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1498700592589.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1498700592589.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1498743207418.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1498743207418.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1498743216279.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1498743216279.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1498743269100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1498743269100.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/1498743288621.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1498743288621.png -------------------------------------------------------------------------------- /CSS三角生成工具/images/colorpicker_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/CSS三角生成工具/images/colorpicker_overlay.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/Node.js_logo.svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/Node.js_logo.svg.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/构造函数-实例-原型之间的关系.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/构造函数-实例-原型之间的关系.png -------------------------------------------------------------------------------- /CSS三角生成工具/images/colorpicker_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/CSS三角生成工具/images/colorpicker_background.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/20160823024542444.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/20160823024542444.jpg -------------------------------------------------------------------------------- /normalize.css-master/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "normalize.css", 3 | "version": "8.0.1", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /javaScript高级笔记/media/1497497605587-8288640195.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/1497497605587-8288640195.png -------------------------------------------------------------------------------- /bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /javaScript高级笔记/media/5f7b98babbb1fbdb7f99354940a1f65.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/5f7b98babbb1fbdb7f99354940a1f65.jpg -------------------------------------------------------------------------------- /javaScript高级笔记/media/664ba37eeee9f4623c06c066867f1d38_r.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/664ba37eeee9f4623c06c066867f1d38_r.jpg -------------------------------------------------------------------------------- /javaScript高级笔记/media/Unofficial_JavaScript_logo_2.svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/Unofficial_JavaScript_logo_2.svg.png -------------------------------------------------------------------------------- /javaScript高级笔记/media/9F437BB7-6844-4FC2-9C91-2D9648433DCA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq34347476/web/HEAD/javaScript高级笔记/media/9F437BB7-6844-4FC2-9C91-2D9648433DCA.png -------------------------------------------------------------------------------- /normalize.css-master/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /lib-flexible-2.0/.gitignore: -------------------------------------------------------------------------------- 1 | # OS 2 | .DS_Store 3 | Thumbs.db 4 | Desktop.ini 5 | 6 | # IDE 7 | .idea/ 8 | .vscode/ 9 | .project 10 | *.swp 11 | *.swo 12 | 13 | # Dependency, Cache, Temporary 14 | node_modules/ 15 | bower_components/ 16 | .svn/ 17 | .sass-cache/ 18 | .nodejs-cache/ 19 | npm-debug.log 20 | 21 | # Distribution 22 | coverage/ 23 | dist/ 24 | docs/ 25 | *.iml 26 | -------------------------------------------------------------------------------- /normalize.css-master/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "normalize.css", 3 | "version": "8.0.1", 4 | "description": "A modern alternative to CSS resets", 5 | "main": "normalize.css", 6 | "style": "normalize.css", 7 | "files": [ 8 | "LICENSE.md", 9 | "normalize.css" 10 | ], 11 | "repository": "necolas/normalize.css", 12 | "license": "MIT", 13 | "bugs": "https://github.com/necolas/normalize.css/issues", 14 | "homepage": "https://necolas.github.io/normalize.css" 15 | } 16 | -------------------------------------------------------------------------------- /CSS三角生成工具/js/ga.js: -------------------------------------------------------------------------------- 1 | var _gaq = _gaq || []; 2 | _gaq.push(['_setAccount', 'UA-26466981-1']); 3 | _gaq.push(['_setDomainName', 'eky.hk']); 4 | _gaq.push(['_trackPageview']); 5 | 6 | (function() { 7 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 8 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 9 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 10 | })(); -------------------------------------------------------------------------------- /lib-flexible-2.0/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | max_line_length = off 11 | indent_style = space 12 | indent_size = 2 13 | 14 | [{package.json,.travis.yml,.eslintrc*}] 15 | indent_style = space 16 | indent_size = 2 17 | 18 | [*.md] 19 | max_line_length = off 20 | trim_trailing_whitespace = false 21 | 22 | [COMMIT_EDITMSG] 23 | max_line_length = off 24 | -------------------------------------------------------------------------------- /bootstrap/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /lib-flexible-2.0/index.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){function n(){t.body?t.body.style.fontSize=12*o+"px":t.addEventListener("DOMContentLoaded",n)}function d(){var e=i.clientWidth/10;i.style.fontSize=e+"px"}var i=t.documentElement,o=e.devicePixelRatio||1;if(n(),d(),e.addEventListener("resize",d),e.addEventListener("pageshow",function(e){e.persisted&&d()}),o>=2){var a=t.createElement("body"),s=t.createElement("div");s.style.border=".5px solid transparent",a.appendChild(s),i.appendChild(a),1===s.offsetHeight&&i.classList.add("hairlines"),i.removeChild(a)}}(window,document); -------------------------------------------------------------------------------- /CSS三角生成工具/js/eye.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Zoomimage 4 | * Author: Stefan Petre www.eyecon.ro 5 | * 6 | */ 7 | (function($){ 8 | var EYE = window.EYE = function() { 9 | var _registered = { 10 | init: [] 11 | }; 12 | return { 13 | init: function() { 14 | $.each(_registered.init, function(nr, fn){ 15 | fn.call(); 16 | }); 17 | }, 18 | extend: function(prop) { 19 | for (var i in prop) { 20 | if (prop[i] != undefined) { 21 | this[i] = prop[i]; 22 | } 23 | } 24 | }, 25 | register: function(fn, type) { 26 | if (!_registered[type]) { 27 | _registered[type] = []; 28 | } 29 | _registered[type].push(fn); 30 | } 31 | }; 32 | }(); 33 | $(EYE.init); 34 | })(jQuery); 35 | -------------------------------------------------------------------------------- /web前端最全笔记/biji_files/monokai.css: -------------------------------------------------------------------------------- 1 | pre{background:#272822;word-wrap:break-word;margin:0 0 20px;padding:10px;color:#fff;font-size:14px}code,pre{font-family:Monaco,courier,monospace}pre .comment{color:#75715E}pre .constant{color:#AE81FF}pre .storage{color:#66D9EF}pre .comment.docstring,pre .string{color:#E6DB74}pre .support.tag{color:#fff}pre .keyword,pre .selector{color:#F92672}pre .inherited-class{font-style:italic}pre .entity.tag,pre .operator,pre .support.tag-name{color:#F92672}pre .entity,pre .entity.attribute,pre .support.attribute{color:#A6E22E}*[data-language="c"] .function.call,pre .support{color:#66D9EF}*[data-language=html] .support.operator{color:#fff}pre .css-property,pre .storage.function{font-style:italic}pre .variable.class,pre .variable.global,pre .variable.instance{color:#A6E22E} -------------------------------------------------------------------------------- /lib-flexible-2.0/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "amfe-flexible", 3 | "version": "2.2.1", 4 | "description": "Build flexible page on mobile platform", 5 | "keywords": [ 6 | "lib", 7 | "amfe", 8 | "flexible", 9 | "mobile", 10 | "css", 11 | "rem", 12 | "vw" 13 | ], 14 | "homepage": "https://github.com/amfe/lib-flexible", 15 | "repository": { 16 | "type": "git", 17 | "url": "git@github.com:amfe/lib-flexible.git" 18 | }, 19 | "author": [ 20 | { 21 | "name": "mingelz", 22 | "email": "mingelz@gmail.com" 23 | } 24 | ], 25 | "scripts": { 26 | "compress": "uglifyjs index.js -o index.min.js -c -m" 27 | }, 28 | "dependencies": {}, 29 | "devDependencies": { 30 | "uglify-js": "^3.0.27" 31 | }, 32 | "license": "MIT" 33 | } 34 | -------------------------------------------------------------------------------- /web前端最全笔记/README.md: -------------------------------------------------------------------------------- 1 | # 更新内容 2 | 3 | ## 4.14.1 4 | 5 | ### 更新详细用法 6 | -webkit-tap-highlight-color 7 | 8 | -webkit-text-size-adjust 9 | 10 | -webkit-appearance 11 | 12 | -webkit-user-select 13 | 14 | -webkit-touch-callout 15 | 16 | background 17 | 18 | TEXT剪裁方式的遮罩效果 19 | 20 | ------------------------更新到布局Ⅰ---------------------- 21 | 22 | ## 4.14.2 23 | ### 更新常用地址 24 | nodejs 官网 http://nodejs.cn/download/ 25 | 26 | Less 官网 http://lesscss.cn/ 27 | 28 | 菜鸟教程 http://www.runoob.com/ 29 | 30 | ### 更新详细用法 31 | flex-flow 32 | 33 | flex-wrap 34 | 35 | ## 4.15.1 36 | ### 添加bootstrap地址 37 | 中文官网:http://www.bootcss.com/ 38 | 39 | 官网:http://getbootstrap.com/ 40 | 41 | 推荐使用:http://bootstrap.css88.com/ 42 | 43 | ## 4.19.1 44 | flexbox 直观讲解网站http://www.webhek.com/apps/flex-cheatsheet/ -------------------------------------------------------------------------------- /web前端最全笔记/biji_files/core.php: -------------------------------------------------------------------------------- 1 | !function(){var p,q,r,a=function(){var b,c,d,e,a=document.getElementsByTagName("script");for(b=0,c=a.length;c>b;b++)if(e=a[b],e.src&&(d=/^(https?:)\/\/[\w\.\-]+\.cnzz\.com\//i.exec(e.src)))return d[1];return window.location.protocol}(),b=encodeURIComponent,c="1253473928",d="",e="",f="online_v3.php",g="z10.cnzz.com",h="1",i="text",j="z",k="站长统计",l=window["_CNZZDbridge_"+c]["bobject"],m="1",n=a+"//online.cnzz.com/online/"+f,o=[];o.push("id="+c),o.push("h="+g),o.push("on="+b(e)),o.push("s="+b(d)),n+="?"+o.join("&"),"0"===m&&l["callRequest"]([a+"//cnzz.mmstat.com/9.gif?abc=1"]),h&&(""!==e?l["createScriptIcon"](n,"utf-8"):(q="z"==j?"https://www.cnzz.com/stat/website.php?web_id="+c:"https://quanjing.cnzz.com","pic"===i?(r=a+"//icon.cnzz.com/img/"+d+".gif",p=""):p=""+k+"",l["createIcon"]([p])))}(); -------------------------------------------------------------------------------- /web前端最全笔记/biji_files/index.js.下载: -------------------------------------------------------------------------------- 1 | $(function(){var n=($(".header"),$(".content")),i=$("#nav>ul>li"),t=$("#main"),o=$("h3").add("h4").add("h6"),h=$("#showmenu"),e=$(window).width();i.on("click",function(){var t=$(this).index();n.hide().eq(t).show(),i.removeClass("on"),$(this).addClass("on"),720>=e&&$("#nav").slideUp()}),o.on("click",function(){$(this).next("div,ul").slideToggle("slow");var n=$(this).children("span").html();"-"==n?$(this).children("span").html("+"):"+"==n&&$(this).children("span").html("-")}),t.on("mouseover","h4+ul>li",function(n){$(this).children("span").css({left:n.pageX+12+"px",top:n.pageY+8+"px",display:"block"})}).on("mouseout","h4+ul>li",function(){$(this).children("span").hide()}),$("#closebox").click(function(){$("#snippet").hide()}),$("#snippet").draggable({handle:"h6",cursor:"move"}),$("#main").on("click","h4+ul>li",function(){var n=$(this).html();$("#snippet").show(),$("#box").html(n)}),$("a:not([href^=http])").each(function(){$(this).click(function(n){n.preventDefault()})}),$("a[href^='http']").each(function(){$(this).click(function(n){n.stopPropagation()})}),h.on("click",function(){$("#nav").slideToggle()})}); -------------------------------------------------------------------------------- /normalize.css-master/LICENSE.md: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | 3 | Copyright © Nicolas Gallagher and Jonathan Neal 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib-flexible-2.0/index.js: -------------------------------------------------------------------------------- 1 | (function flexible (window, document) { 2 | var docEl = document.documentElement 3 | var dpr = window.devicePixelRatio || 1 4 | 5 | // adjust body font size 6 | function setBodyFontSize () { 7 | if (document.body) { 8 | document.body.style.fontSize = (12 * dpr) + 'px' 9 | } 10 | else { 11 | document.addEventListener('DOMContentLoaded', setBodyFontSize) 12 | } 13 | } 14 | setBodyFontSize(); 15 | 16 | // set 1rem = viewWidth / 10 17 | function setRemUnit () { 18 | var rem = docEl.clientWidth / 10 19 | docEl.style.fontSize = rem + 'px' 20 | } 21 | 22 | setRemUnit() 23 | 24 | // reset rem unit on page resize 25 | window.addEventListener('resize', setRemUnit) 26 | window.addEventListener('pageshow', function (e) { 27 | if (e.persisted) { 28 | setRemUnit() 29 | } 30 | }) 31 | 32 | // detect 0.5px supports 33 | if (dpr >= 2) { 34 | var fakeBody = document.createElement('body') 35 | var testElement = document.createElement('div') 36 | testElement.style.border = '.5px solid transparent' 37 | fakeBody.appendChild(testElement) 38 | docEl.appendChild(fakeBody) 39 | if (testElement.offsetHeight === 1) { 40 | docEl.classList.add('hairlines') 41 | } 42 | docEl.removeChild(fakeBody) 43 | } 44 | }(window, document)) 45 | -------------------------------------------------------------------------------- /lib-flexible-2.0/README.md: -------------------------------------------------------------------------------- 1 | # amfe-flexible 2 | 3 | [Classic edition (0.3.2)](https://github.com/amfe/lib-flexible/tree/master) 4 | 5 | > 由于`viewport`单位得到众多浏览器的兼容,`lib-flexible`这个过渡方案已经可以放弃使用,不管是现在的版本还是以前的版本,都存有一定的问题。建议大家开始使用`viewport`来替代此方案。`vw`的兼容方案可以参阅《[如何在Vue项目中使用vw实现移动端适配](https://www.w3cplus.com/mobile/vw-layout-in-vue.html)》一文。 6 | 7 | ## Usage 8 | 9 | #### Install 10 | 11 | `npm i -S amfe-flexible` 12 | 13 | #### Import 14 | 15 | ```html 16 | 17 | 18 | ``` 19 | 20 | You can inline this file with [inline-source](https://npmjs.org/package/inline-source). 21 | 22 | #### Develop 23 | 24 | Use [postcss-adaptive](https://www.npmjs.com/package/postcss-adaptive). 25 | 26 | ## License 27 | 28 | (The MIT License) 29 | 30 | Copyright (c) 2016 Alibaba MFE 31 | 32 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 33 | 34 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 35 | 36 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 37 | -------------------------------------------------------------------------------- /CSS三角生成工具/js/html5.js: -------------------------------------------------------------------------------- 1 | // iepp v2.1pre @jon_neal & @aFarkas github.com/aFarkas/iepp 2 | // html5shiv @rem remysharp.com/html5-enabling-script 3 | // Dual licensed under the MIT or GPL Version 2 licenses 4 | /*@cc_on(function(a,b){function r(a){var b=-1;while(++b 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 14 | 15 | 16 | 17 | 18 | 19 | 64 | 65 | -------------------------------------------------------------------------------- /CSS三角生成工具/css/common.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* 智能社 - www.zhinengshe.com */ 3 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { 4 | margin:0; 5 | padding:0; 6 | font-family:"Microsoft YaHei" 7 | } 8 | table { 9 | border-collapse:collapse; 10 | border-spacing:0; 11 | } 12 | fieldset,img { 13 | border:0; 14 | } 15 | address,caption,cite,code,dfn,em,strong,th,var { 16 | font-style:normal; 17 | font-weight:normal; 18 | } 19 | ol,ul { 20 | list-style:none; 21 | } 22 | caption,th { 23 | text-align:left; 24 | } 25 | q:before,q:after { 26 | content:''; 27 | } 28 | abbr,acronym { border:0;} 29 | article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section { 30 | display: block; 31 | } 32 | html.full, html.full body { 33 | font-family:Corbel, 'MS PGothic', 'Microsoft JhengHei', Arial, Verdana, Helvetica, sans-serif; 34 | } 35 | input, select, textarea{ 36 | font-family:Arial, Verdana, Helvetica, sans-serif; 37 | } 38 | a{ 39 | color:#197882; 40 | text-decoration:none; 41 | } 42 | .clearfix:after { content: "."; display:block; height:0px; clear:both; visibility:hidden; } 43 | .clearfix { zoom:1 \9; display:block; } 44 | 45 | hr{ 46 | border:1px #666 solid; 47 | width:100%; 48 | margin:20px 0; 49 | } 50 | #top{ 51 | width:100%; 52 | height:90%; 53 | position:relative; 54 | overflow:auto; 55 | } 56 | #header{ 57 | height:65px; 58 | width:100%; 59 | background:#eee; 60 | position:relative; 61 | padding:10px 0 20px; 62 | } 63 | #header .title{ 64 | font-size:36px; 65 | text-align:center; 66 | } 67 | #header #subTitle{ 68 | font-size:18px; 69 | text-align:center; 70 | } 71 | #social{ 72 | font-size:24px; 73 | position:absolute; 74 | right:20px; 75 | top:0px; 76 | width:50px; 77 | height:200px; 78 | color:#666; 79 | } 80 | #social .fb-like{ 81 | position:absolute; 82 | top:0; 83 | } 84 | #social .fb-like > span{ 85 | position:absolute !important; 86 | top:45px; 87 | height:30px !important; 88 | } 89 | #social .twitter-share-button{ 90 | position:absolute !important; 91 | top:0px; 92 | padding-top:0px; 93 | } 94 | #___plusone_0{ 95 | position:absolute !important; 96 | top:27px; 97 | padding-left:5px; 98 | padding-top:5px; 99 | } 100 | 101 | #footer{ 102 | height:90px; 103 | width:100%; 104 | background:#eee; 105 | overflow:hidden; 106 | position:relative; 107 | clear:both; 108 | } 109 | html.full #footer{ 110 | bottom:0; 111 | left:0; 112 | position:absolute; 113 | } 114 | #footer .title{ 115 | display:block; 116 | font-size:24px; 117 | position:absolute; 118 | right:20px; 119 | top:30%; 120 | color:#666; 121 | } 122 | #footer .title a{ 123 | color:#666; 124 | } 125 | #HTML5Logo{ 126 | font-size:24px; 127 | position:absolute; 128 | left:20px; 129 | top:15%; 130 | color:#666; 131 | } 132 | .infoList{ 133 | padding-top:20px; 134 | width:720px; 135 | margin:0 auto; 136 | } 137 | .infoList li{ 138 | display:inline-block; 139 | vertical-align:top; 140 | margin-right:20px; 141 | } 142 | .infoSublist{ 143 | margin-left:10px; 144 | } 145 | .infoSublist li{ 146 | font-size:12px; 147 | display:inline-block; 148 | } 149 | .infoSublist.browserList{ 150 | width:350px; 151 | } 152 | .infoSublist.verticalList li{ 153 | display:block; 154 | } 155 | -------------------------------------------------------------------------------- /HTML笔记/html5新增标签.md: -------------------------------------------------------------------------------- 1 | \# html5+css3 是之前的一个升级 2 | ### html5 3 | 1.语义化标签 4 | 2.新增表单属性以元素 5 | 3.存储 6 | 4.地理定位 7 | 5.文件上传及读取 8 | 6.音频视频 9 | canvas!!扩展 10 | ### css3: 11 | 过渡 12 | 动画 13 | 2d 旋转 放大 移动 扭曲 14 | 3d 旋转 放大 移动 扭曲(立体效果) 15 | flex: 16 | ### 移动web:(移动端布局) 17 | 百分比布局 % 18 | 19 | flex:布局; 20 | 21 | rem布局: 22 | 23 | 响应式布局(框架): bootstrap; 24 | 25 | ## 1.语义化标签: 26 | 1.针对于移动端 27 | 2.ie9不支持(会把语义化标签当做行内元素)----转换为display:block 28 | 3.ie6 7(不认识语义化标签) ---js创建元素在转化为块元素。 29 | 1.header头部标签 30 | 2.nav:导航标签 31 | 3.main:主体标签 32 | 4.article:文章 33 | 5.aside:侧边栏 34 | 6.footer:底部标签 35 | 7.section:某一个区域部分 36 | ## 2.音频: 37 | audio 38 | 1.src:音频的来源 39 | 2.controls:控制器 40 | 3.autoplay:自动播放 41 | 4.loop:循环播放 42 | ## 3.视频: 43 | video: 44 | 1.autoplay:自动播放 45 | 2.controls:控制器 46 | 3.width与height只设置一个等比例放大缩小 47 | 4.loop:循环 48 | 5.src路径 49 | 6.poster:当浏览器打开的时候默认显示的第一帧(画面) 50 | 7.muted:静音播放。(js可以控制解决) 51 | ## 4.input新增标签元素 (要有form 表单 submit提交) 52 | 1.url:网址(合法的网址) 53 | 2.email:邮箱 54 | 3.date:日期 55 | 4.time:当前时间 56 | 5.week:周 57 | 6.number:数字键盘 只能输入数字 58 | 7.tel:数字键盘 只能输入数字 59 | 8.search:人性化体验 60 | 9.表单分组: 61 |
62 | 当前组的标题 63 | hello 64 |
65 | 10. 下拉列表 要与input与datalist结合使用 input里面list的属性值与datalist里面的id值保持一致(绑定) 66 | 67 | 68 | 69 | 70 | 71 | 72 | ## 5.表单属性: 73 | 1.required: 必须输入的 74 | 2.placeholder:默认提示符(占位符) 75 | 3.autofocus:默认获取焦点 76 | 4.autocomplete:提示符 off|on 1.必须有name属性 2.必须提交过 3.在form表单里面 77 | 5.multiple:可以选择多个文件 78 | 6.disabled 禁止用户操作。 79 | ## 6.css3之属性选择器: 80 | 1.div[class] 标签名[属性] --- 选择div且包含属性为class 81 | 2.[class] [属性] 只要是包含class属性 82 | 3. div[class=boxa] 标签名[属性=属性值]。 83 | 4. div[class^=box] 以box类名开头的。 84 | 5.div[class$=b] 以b结尾的。 85 | 6.div[class*=o] 包含o就会被选中。 86 | ## 7.结构选择器: 87 | 1.:first-child 88 | 2.last-child 89 | 3.nth-child(n) 90 | 4.nth-of-type(n) 91 | ## 8.伪元素选择器: 92 | ::before在当前元素的前面 ::after在当前元素的后面 content:"" 行内元素 93 | ::first-letter 首字母 94 | ::first-line 首行 95 | ::selection 选中样式的修饰 96 | ## 9.css3 之 2d: 97 | ###1.移动: 98 | 写法: 99 | 1.transform:translate(水平,垂直) 2.transform:translateX(水平) 3.2.transform:translateY(垂直) 100 | 注意: 1.根据自身移动 2.对行内元素无效 101 | ###2.旋转 102 | 1.transform:rotate(30deg) 2.rotateY() 3.rotateX() 103 | 1.旋转默认中心点旋转 正值是顺时针 负值是逆时针 104 | ###3.缩放 105 | transform:scale(2) 数值 106 | 两个值 第一个值代表水平放大或缩小 第一个值代表垂直放大或缩小 107 | #### 4.倾斜(扭曲) 108 | 1.transform: skew(ndeg); 2.transform: skewX(ndeg) 3.transform: skewY(ndeg) 109 | 可以写多个: 110 | transform: translate() rotate() scale() skew(); 111 | 旋转可以旋转坐标轴!!! 112 | ## 10. 动画 113 | animation: 动画名字 动画时间 运动曲线 动画何时开始 播放次数 是否反方向 结束的状态; 114 | 任何动画 做完之后都会回到原来的位置(状态)!! -------------------------------------------------------------------------------- /normalize.css-master/README.md: -------------------------------------------------------------------------------- 1 | # normalize.css 2 | 3 | Normalize Logo 6 | 7 | > A modern alternative to CSS resets 8 | 9 | [![npm][npm-image]][npm-url] [![license][license-image]][license-url] 10 | [![changelog][changelog-image]][changelog-url] 11 | [![gitter][gitter-image]][gitter-url] 12 | 13 | 14 | **NPM** 15 | 16 | ```sh 17 | npm install --save normalize.css 18 | ``` 19 | 20 | **CDN** 21 | 22 | See https://yarnpkg.com/en/package/normalize.css 23 | 24 | **Download** 25 | 26 | See https://necolas.github.io/normalize.css/latest/normalize.css 27 | 28 | 29 | ## What does it do? 30 | 31 | * Preserves useful defaults, unlike many CSS resets. 32 | * Normalizes styles for a wide range of elements. 33 | * Corrects bugs and common browser inconsistencies. 34 | * Improves usability with subtle modifications. 35 | * Explains what code does using detailed comments. 36 | 37 | 38 | ## Browser support 39 | 40 | * Chrome 41 | * Edge 42 | * Firefox ESR+ 43 | * Internet Explorer 10+ 44 | * Safari 8+ 45 | * Opera 46 | 47 | 48 | ## Extended details and known issues 49 | 50 | Additional detail and explanation of the esoteric parts of normalize.css. 51 | 52 | #### `pre, code, kbd, samp` 53 | 54 | The `font-family: monospace, monospace` hack fixes the inheritance and scaling 55 | of font-size for preformatted text. The duplication of `monospace` is 56 | intentional. [Source](https://en.wikipedia.org/wiki/User:Davidgothberg/Test59). 57 | 58 | #### `sub, sup` 59 | 60 | Normally, using `sub` or `sup` affects the line-box height of text in all 61 | browsers. [Source](https://gist.github.com/413930). 62 | 63 | #### `select` 64 | 65 | By default, Chrome on OS X and Safari on OS X allow very limited styling of 66 | `select`, unless a border property is set. The default font weight on `optgroup` 67 | elements cannot safely be changed in Chrome on OSX and Safari on OS X. 68 | 69 | #### `[type="checkbox"]` 70 | 71 | It is recommended that you do not style checkbox and radio inputs as Firefox's 72 | implementation does not respect box-sizing, padding, or width. 73 | 74 | #### `[type="number"]` 75 | 76 | Certain font size values applied to number inputs cause the cursor style of the 77 | decrement button to change from `default` to `text`. 78 | 79 | #### `[type="search"]` 80 | 81 | The search input is not fully stylable by default. In Chrome and Safari on 82 | OSX/iOS you can't control `font`, `padding`, `border`, or `background`. In 83 | Chrome and Safari on Windows you can't control `border` properly. It will apply 84 | `border-width` but will only show a border color (which cannot be controlled) 85 | for the outer 1px of that border. Applying `-webkit-appearance: textfield` 86 | addresses these issues without removing the benefits of search inputs (e.g. 87 | showing past searches). 88 | 89 | ## Contributing 90 | 91 | Please read the [contribution guidelines](CONTRIBUTING.md) in order to make the 92 | contribution process easy and effective for everyone involved. 93 | 94 | 95 | [changelog-image]: https://img.shields.io/badge/changelog-md-blue.svg?style=flat-square 96 | [changelog-url]: CHANGELOG.md 97 | [license-image]: https://img.shields.io/npm/l/normalize.css.svg?style=flat-square 98 | [license-url]: LICENSE.md 99 | [npm-image]: https://img.shields.io/npm/v/normalize.css.svg?style=flat-square 100 | [npm-url]: https://www.npmjs.com/package/normalize.css 101 | [gitter-image]: https://img.shields.io/badge/chat-gitter-blue.svg?style=flat-square 102 | [gitter-url]: https://gitter.im/necolas/normalize.css 103 | -------------------------------------------------------------------------------- /CSS三角生成工具/css/colorpicker.css: -------------------------------------------------------------------------------- 1 | .colorpicker { 2 | width: 356px; 3 | height: 176px; 4 | overflow: hidden; 5 | position: absolute; 6 | background: url(../images/colorpicker_background.png); 7 | font-family: Arial, Helvetica, sans-serif; 8 | display: none; 9 | } 10 | .colorpicker_color { 11 | width: 150px; 12 | height: 150px; 13 | left: 14px; 14 | top: 13px; 15 | position: absolute; 16 | background: #f00; 17 | overflow: hidden; 18 | cursor: crosshair; 19 | } 20 | .colorpicker_color div { 21 | position: absolute; 22 | top: 0; 23 | left: 0; 24 | width: 150px; 25 | height: 150px; 26 | background: url(../images/colorpicker_overlay.png); 27 | } 28 | .colorpicker_color div div { 29 | position: absolute; 30 | top: 0; 31 | left: 0; 32 | width: 11px; 33 | height: 11px; 34 | overflow: hidden; 35 | background: url(../images/colorpicker_select.gif); 36 | margin: -5px 0 0 -5px; 37 | } 38 | .colorpicker_hue { 39 | position: absolute; 40 | top: 13px; 41 | left: 171px; 42 | width: 35px; 43 | height: 150px; 44 | cursor: n-resize; 45 | } 46 | .colorpicker_hue div { 47 | position: absolute; 48 | width: 35px; 49 | height: 9px; 50 | overflow: hidden; 51 | background: url(../images/colorpicker_indic.gif) left top; 52 | margin: -4px 0 0 0; 53 | left: 0px; 54 | } 55 | .colorpicker_new_color { 56 | position: absolute; 57 | width: 60px; 58 | height: 30px; 59 | left: 213px; 60 | top: 13px; 61 | background: #f00; 62 | } 63 | .colorpicker_current_color { 64 | position: absolute; 65 | width: 60px; 66 | height: 30px; 67 | left: 283px; 68 | top: 13px; 69 | background: #f00; 70 | } 71 | .colorpicker input { 72 | background-color: transparent; 73 | border: 1px solid transparent; 74 | position: absolute; 75 | font-size: 10px; 76 | font-family: Arial, Helvetica, sans-serif; 77 | color: #898989; 78 | top: 4px; 79 | right: 11px; 80 | text-align: right; 81 | margin: 0; 82 | padding: 0; 83 | height: 11px; 84 | } 85 | .colorpicker_hex { 86 | position: absolute; 87 | width: 72px; 88 | height: 22px; 89 | background: url(../images/colorpicker_hex.png) top; 90 | left: 212px; 91 | top: 142px; 92 | } 93 | .colorpicker_hex input { 94 | right: 6px; 95 | } 96 | .colorpicker_field { 97 | height: 22px; 98 | width: 62px; 99 | background-position: top; 100 | position: absolute; 101 | } 102 | .colorpicker_field span { 103 | position: absolute; 104 | width: 12px; 105 | height: 22px; 106 | overflow: hidden; 107 | top: 0; 108 | right: 0; 109 | cursor: n-resize; 110 | } 111 | .colorpicker_rgb_r { 112 | background-image: url(../images/colorpicker_rgb_r.png); 113 | top: 52px; 114 | left: 212px; 115 | } 116 | .colorpicker_rgb_g { 117 | background-image: url(../images/colorpicker_rgb_g.png); 118 | top: 82px; 119 | left: 212px; 120 | } 121 | .colorpicker_rgb_b { 122 | background-image: url(../images/colorpicker_rgb_b.png); 123 | top: 112px; 124 | left: 212px; 125 | } 126 | .colorpicker_hsb_h { 127 | background-image: url(../images/colorpicker_hsb_h.png); 128 | top: 52px; 129 | left: 282px; 130 | } 131 | .colorpicker_hsb_s { 132 | background-image: url(../images/colorpicker_hsb_s.png); 133 | top: 82px; 134 | left: 282px; 135 | } 136 | .colorpicker_hsb_b { 137 | background-image: url(../images/colorpicker_hsb_b.png); 138 | top: 112px; 139 | left: 282px; 140 | } 141 | .colorpicker_submit { 142 | position: absolute; 143 | width: 22px; 144 | height: 22px; 145 | background: url(../images/colorpicker_submit.png) top; 146 | left: 322px; 147 | top: 142px; 148 | overflow: hidden; 149 | } 150 | .colorpicker_focus { 151 | background-position: center; 152 | } 153 | .colorpicker_hex.colorpicker_focus { 154 | background-position: bottom; 155 | } 156 | .colorpicker_submit.colorpicker_focus { 157 | background-position: bottom; 158 | } 159 | .colorpicker_slider { 160 | background-position: bottom; 161 | } 162 | -------------------------------------------------------------------------------- /PHP笔记/README.md: -------------------------------------------------------------------------------- 1 | # PHP 2 | 3 | ## 服务器的概念: 4 | 5 | 是网络为客户端计算机提供各种服务的高性能计算机 6 | 服务器就是个软件 7 | 这个软件主要是可以为客户端提供服务的软件 8 | ---- 如果参与运算程序需要配合后台语言java php c; 9 | 只有当其他计算机中的浏览器发出请求时 服务器才能响应 10 | B/S架构: 11 | 12 | 浏览器与服务器交互; 13 | 14 | C/S架构: 15 | 16 | 下载到本地 在与服务器交互; 17 | 18 | ip: 19 | 20 | 每台计算机的标识 ---作为一个计算机的标识 21 | 22 | url: 23 | 24 | 地址栏中输入的网址url 统一资源定位符 http:www.baidu.com/index.html?id=1 25 | 26 | http:\\ 和 https:\\ 27 | 28 | 超文本传输协议 服务器传输超文本到本地浏览器的传送协议; 29 | 30 | 注意: 31 | http是无链接 含义是每次链接只处理一个请求 收到客户的应答即断开; 32 | http请求时无状态请求 是指对事物没有记忆能力 CGI处理程序 33 | 34 | www: 35 | 36 | 万维网服务器 是指世界各地的计算机网络 37 | baidu.com: 是百度的域名 38 | index.html:文件路径 39 | 40 | 域名与ip地址对应关系: 41 | 42 | 多个域名可以对应一个ip地址 43 | 44 | ## php的特点: 45 | 46 | 1.混合了c java php自创的语法 47 | 2.php可以将程序嵌入到网页中去 48 | 3.支持所有流行的数据库以及操作系统 49 | 4.弱类型 50 | 51 | ## php的输出语句: 52 | 53 | echo 只能输出字符串 等单一数据 不能输出数据类型 数组等 54 | print(): 只能输出字符串 等单一数据 不能输出数据类型 数组等有返回值 55 | print_r(): 可以输出字符串 数组。。可以输出复杂数据类型 56 | var_dump: 字符串 数据类型 长度 57 | die() 先输出内容 退出程序 58 | 59 | ## php中的函数: 60 | 61 | isset():判断变量是否定义; 62 | 如果定义返回true 否则返回false 63 | 在php中true---->1 false---null 64 | empty(): 65 | 判断值是否为空; 0 "0" false Array() null 66 | unset(): 删除变量 67 | 68 | ## php中的数组: 69 | 70 | 索引数组:通过索引操作数组 71 | 72 | $arr = Array(1,2,3,true,"abc"); 73 | $arr = [1,2,3,4,5] 74 | 75 | 访问与js一样 76 | 77 | 隐形数组:$arr[] = 1;给变量增加一个中括号 系统自动生成数字下标 与值 78 | 79 | 对于索引数组: 自动递增数组的索引 80 | 对于关联数组: 从0开始索引 81 | 82 | 二维数组: 83 | 84 | $arr = Array( 85 | "first"=>Array( 86 | "name"=>"jack", 87 | "age"=>20 88 | ), 89 | "two"=>Array( 90 | "name"=>"jack", 91 | "age"=>20 92 | ) 93 | ); 94 | 95 | 关联数组: 96 | 97 | 以键值对的形式描述数据 98 | $arr = array( 99 | "name"=>"jack", 100 | "age"=>20, 101 | "gender"=>true 102 | ) 103 | 104 | ### 遍历数组: 105 | 106 | 1.for循环 107 | 108 | for($i = 0;$i$value){ 115 | 遍历索引数组 与关联数组 116 | $key:属性(索引) 117 | $value 值 118 | } 119 | 120 | 可以简写: 121 | foreach($arr as $value){ 122 | 123 | } 124 | 125 | 数组的注意事项: 126 | 127 | 1.如果添加元素的时候设置key name就没有索引 128 | 2.如果没有设置key值 那么系统自动生成索引 129 | 3.如果数组已经存在 那么就将元素添加到当前数组中 130 | 4.如果不存在就先创建 在赋值 131 | 132 | 二维数组遍历: 133 | 134 | foreach($arr as $value){ 135 | // print_r($value); 136 | foreach($value as $value1){ 137 | print_r($value1); 138 | } 139 | } 140 | 141 | ## 数据类型转换: 142 | 143 | 转换整型:$num = (int)$str; 144 | 转换为浮点型:$int = floatval($num); 145 | 转化为字符串:(String)$str 146 | 转化布尔型: (bool)$str 147 | 算数运算符: 148 | + - * % ++ --; 149 | 逻辑运算符: 150 | ! && ||; 151 | 比较运算符: 152 | > < >= <= == 153 | 三元运算符: 154 | a>b?"":"" 155 | 156 | ## global:引用全局变量 157 | 158 | 1. 不能再引用的同时对变量赋值 159 | 2. 如果没有参数项引用其他变量 需要global; 160 | 3. global 本质是引用 改变值全局也会发生变化; 161 | 162 | ## php字符串拼接: 163 | 164 | 字符串与字符串之间用 点(.) 165 | 单引号与双引号的区别: 166 | 双引号会解析变量 167 | 168 | ## 超全局变量: 169 | 170 | $GLOABLS; 171 | $_SERVER; 172 | $_GET 173 | $_POST 174 | $_COOKIE 175 | $_SESSION 176 | 177 | 只要定义变量 都会存储在超全局变量中的 $GLOABLS; 178 | 179 | $GLOABLS 与 global区别: 180 | 181 | $GLOABLS 真实存在的 182 | global 只是引用 183 | 184 | ## 定义常量的语法: 185 | 186 | define("常量名称",常量值,true|false); 187 | 例如: define("PI",3,14,true); true:不敏感(支持大写和小写); 188 | 189 | ## 魔术常量: 190 | 191 | __LINE__ 当前的代码行数 192 | __FILE__:当前文件夹的路径 193 | __DIR__:获取文件目录; 194 | 195 | ## 载入文件: 相当在当前文件下执行代码; 196 | 197 | include: 1.如果引入失败 不会影响下面的元素 可以执行多次; 198 | include_once: 2.当引入失败不会影响下面 的元素的执行!多次的情况下 只会载入一次。 199 | require: 如果代码载入失败,后续代码不会执行 200 | require_once:2.当引入文件失败会影响下面的代码的执行 只能引入一次; 201 | 202 | strlen() 获取字符串的长度 203 | 204 | 时间: 205 | 206 | echo date("Y-M-D H:I:S"); 207 | 208 | 读取文件: 209 | 210 | file_get_contents:读取文件 211 | 212 | 写入文件: 213 | 214 | 覆盖写入文件 215 | $res = file_put_contents("data.txt","写入的内容","); 216 | 追加写入文件 217 | $res = file_put_contents("data.txt","写入的内容",FILE_APPEND"); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # git 安装配置 2 | 3 | ## 0. 安装 Git 4 | 5 | 网上有很多 Git 安装教程,如果需要图形界面,windows 下建议使用 TortoiseGit,linux 建议使用 Git GUI 或者 GITK。 6 | 7 | ## 1. Git 基本配置 8 | 9 | git config 可以配置 git 的参数,可以使用 git config --list 查看已经配置的 git 参数。其中有三个级别的保存位置, 10 | 11 | --system、--global、--local,分别表示所有用户(本系统)、当前用户(全局)、本地配置(当前目录),默认使用--local。 12 | 13 | ### 配置用户名及邮箱 14 | 15 | 在使用 Git 提交前,必须配置用户名和邮箱,这些信息会永久保存到历史记录中。 16 | 17 | git config --global user.name "Tocy" 18 | git config --global user.email zyvj@qq.com 19 | 20 | 其他配置 21 | 22 | 如果在windows下建议还是配置下默认文本编辑器core.editor和差异分析工具merge.tool。 23 | 24 | ## 2. 创建 Git 仓库 25 | 26 | 可以直接调用git init初始化当前目录,即创建Git仓库。 27 | 28 | ## 3. 获得 Git 仓库 29 | 30 | 如果需要克隆远程仓库,可以使用 git clone,比如: 31 | 32 | git clone https://github.com/qq34347476/web.git 33 | 34 | ## 4. 提交更新 35 | 36 | 在 windows 下的 Git GUI 中,提交很简单,右键-TortoiseGit-Commit。那么命令行下需要怎么处理? 37 | 38 | Git中每个文件都有三种状态:committed、staged、modified。它们之间关系如下: 39 | commit <-- stage <-- modify 40 | commit --> --- --modify 41 | 42 | 我们获取的 Git 仓库中的所有文件都是 committed 状态, 43 | 44 | 如果你在本地修改了文件 a,a 的状态就变成 modified 的; 45 | 46 | 如果使用 git add a,a 的状态变成 staged; 47 | 48 | 如果使用 git commit,a 的状态就变成 commited。 49 | 50 | 这种状态变化也说明复制代码是很方便的,但是提交更新请慎重。 51 | 52 | 当然还有一种文件状态,未跟踪状态(unversioned/untracked),通过使用 git add 可以把未跟踪状态变更为 staged;通过 git rm 可以将 staged 或者 committed 状态变为未跟踪状态。 53 | 54 | ### git status 55 | 56 | 通常提交前先检查下修改了什么内容,当前 Git 目录下各文件的状态。 57 | 58 | $ git status 59 | On branch master 60 | 61 | Initial commit 62 | 63 | Untracked files: 64 | (use "git add ..." to include in what will be committed) 65 | 66 | nothing added to commit but untracked files present (use "git add" to track) 67 | 68 | ### git add 69 | 70 | git add 可以添加文件或者目录,也可以使用通配符。比如: 71 | 72 | git add Readme.md # add file only 73 | git add *.cpp # add all cpp files 74 | git add /home/code/ # add all files in /home/code 75 | git diff 76 | git diff可以查看当前目录的所有修改。 77 | 78 | 提交之前,还是单独确认下处于 staged 状态的文件有哪些,并保证修改正确。在实际应用中,可能还需要使用 git diff 导出 PATCH 做代码走读。 79 | 80 | 可以使用 git diff --staged 或 git diff --cached 查看 staged 与上次提交快照之间的区别。 81 | 82 | ### git commit 83 | 84 | 提交前需慎重。直接调用 git commit 会弹出编辑器,输入提交日志(如果是多行日志,建议使用)。 85 | 86 | 针对单行日志提交的情况,可以使用如下命令: 87 | git commit -m "add readme"。 88 | 还有一种快捷的提交方式,直接跳过stage缓存区,直接提交当前目录下的所有修改 89 | git commit -a(使用这个命令前建议确认下当前目录的修改是否正确、必须)。 90 | 91 | ### git rm 92 | 93 | git rm 会把文件从当前目录删除(不会保存删除的文件)。 94 | 如果需要从 Git 仓库中删除,但保留在当前工作目录中,亦即从跟踪清单中删除,可以使用 95 | 96 | git rm --cached readme.md。 97 | 98 | ## 5. 提交历史查看 99 | 100 | 可以使用 git log 查看当前工程的所有提交的日志。 101 | 102 | git log --stat # 仅显示摘要选项 103 | git log --pretty=oneline # 定制记录格式 104 | git log --graph # 图像化分支和版本更新 105 | 106 | ## 6. 撤销更新 107 | 108 | ## 7. 远程仓库 109 | 110 | 可以使用 git remote 查看当前的远程库。 111 | 112 | ### git remote -v 可以显示对应的克隆地址。(对于多个远程仓库很有用) 113 | 114 | ### 添加远程仓库 115 | 116 | git remote add [short_name] [url]可以添加新的远程仓库。 117 | 118 | ### 从远程仓库抓取数据 119 | 120 | git fetch [remote-name]可以从远程仓库抓取数据到本地。 121 | 也可以使用git pull 122 | 123 | ### 推送数据到远程仓库 124 | 125 | git push [remote_name] [branch_name] 126 | 默认使用origin和master。 127 | 128 | ### 查看远程仓库信息 129 | 130 | git remote show origin 131 | 132 | ### 远程仓库的删除和重命名 133 | 134 | git remote rename [old_name] [new_name] 135 | git remote rm [remote_name] 136 | 137 | ## 8. 打 Tags 138 | 139 | 可使用 git tag 显示当前库中的标签。 140 | 141 | 添加标签(含附注) 142 | 143 | git tag -a v0.1 -m "my version 0.1" 144 | 使用如下命令查看Tag日志信息(指定对应标签的名字) 145 | git show v0.1 146 | 也可使用SHA-1的提交表示创建tag: 147 | git tag -a v0.2 [SHA-1] -m "my version 0.2" 148 | 149 | 分享标签 150 | 151 | 默认的,git push不会推送标签信息到远程仓库,需要通过命令显式推送。 152 | git push origin v0.1 153 | 如果需要推送所有标签,使用 154 | git push origin --tags 155 | 156 | ## 9. Git 分支 157 | 158 | git 分支是轻量级的,速度很快,仅记录索引信息。 159 | 160 | ### 显示所有分支 161 | 162 | 使用git branch可显示当前所有分支。 163 | 可以使用--merged和--no-merged查看已经合并、未合并的分支。 164 | 165 | ### 创建及切换分支 166 | 167 | 可以使用下面命令直接切换并创建分支 168 | 169 | git checkout -b testing 170 | 171 | 等价于 172 | 173 | $git branch testing # 创建testing 分支 174 | $git checkout testing # 切换到testing分支 175 | 176 | 注意切换分支时请保持工作目录没有未提交的修改。Git 鼓励使用分支,处理完问题之后合并分支即可。 177 | 178 | ### 分支合并 179 | 180 | 将 hotfix 分支合并到 master(主分支)上,需要通过下面命令: 181 | 182 | $git checkout master 183 | $git merge hotfix 184 | 185 | 合并之后可以使用 git branch -d hotfix 删除分支。 186 | 如果合并时存在冲突,需要手工修改。 187 | -------------------------------------------------------------------------------- /HTML笔记/01-前言&WEB标准.md: -------------------------------------------------------------------------------- 1 | --- 2 | typora-copy-images-to: media 3 | --- 4 | 5 | > 第01阶段.前端基础.认识WEB 6 | # 基础学习目标. 7 | 8 | 目标: 能根据psd文件,用HTML+CSS 布局出符合W3C规范的网页。 9 | 10 | 网站首页 11 | 12 | 13 | 14 | 列表页、详情页、登录页、 注册页等等。。。。 15 | 16 | 17 | 18 | # 课程安排 19 | 20 | 21 | 22 | 就业班详情 参看: http://www.itcast.cn/course/web.shtml 23 | 24 | # HTML 第一天目标 25 | 26 | 能够写出基本的html页面(里面包含图片、链接、文字等网页元素标签) 27 | 28 | 29 | 30 | # 认识WEB 31 | 32 | ## 1. 认识网页 33 | 34 | ``` 35 | 网页主要由文字、图像和超链接等元素构成。当然,除了这些元素,网页中还可以包含音频、视频以及Flash等。 36 | ``` 37 | 38 | 39 | 40 | **思考:** 41 | 42 | 网页是如何形成的呢? 43 | 44 | 45 | 46 | 47 | 48 | 49 | ### 总结 50 | 51 | 网页有图片、链接、文字等元素组成,我们后面的任务就是要把这部分网页元素用代码写出来。。。 52 | 53 | ## 2. 浏览器(显示代码) 54 | 55 | ``` 56 | 浏览器是网页显示、运行的平台,常用的浏览器有IE、火狐(Firefox)、谷歌(Chrome)、Safari和Opera等。我们平时称为五大浏览器。 57 | ``` 58 | 59 | 60 | 61 | 可能你最熟悉的是 IE浏览器,但是。。。 62 | 63 | 64 | 65 | ### 2.1 查看浏览器占有的市场份额 66 | 67 | 查看网站: http://tongji.baidu.com/data/browser 68 | 69 | 70 | 71 | 2008年,大名鼎鼎的互联网巨头Google公司发布了它的首款浏览器Chrome浏览器。 72 | 73 | 跟王思聪一样,没办法,生下来人家就是富二代官二代啊,后台太强,而且确实先天能力得天独厚。 74 | 75 | **pink老师 一句话说出他们:** 76 | 77 | > 出自谷歌,唯我不败;一统江湖,千秋万代。 78 | 79 | ### 2.2 常见浏览器内核(了解) 80 | 81 | 首先解释一下浏览器内核是什么东西。英文叫做:Rendering Engine,中文翻译很多,排版引擎、解释引擎、渲染引擎,现在流行称为浏览器内核. 82 | 83 | ``` 84 | 负责读取网页内容,整理讯息,计算网页的显示方式并显示页面. 85 | ``` 86 | 因为浏览器太多啦, 但是现在主要流行的就是下面几个: 87 | 88 | | 浏览器 | 内核 | 备注 | 89 | | :------ | :------------: | :----------------------------------------------------------- | 90 | | IE | Trident | IE、猎豹安全、360极速浏览器、百度浏览器 | 91 | | firefox | Gecko | 可惜这几年已经没落了,打开速度慢、升级频繁、猪一样的队友flash、神一样的对手chrome。 | 92 | | Safari | webkit | 现在很多人错误地把 webkit 叫做 chrome内核(即使 chrome内核已经是 blink 了)。苹果感觉像被别人抢了媳妇,都哭晕再厕所里面了。 | 93 | | chrome | Chromium/Blink | 在 Chromium 项目中研发 Blink 渲染引擎(即浏览器核心),内置于 Chrome 浏览器之中。Blink 其实是 WebKit 的分支。大部分国产浏览器最新版都采用Blink内核。二次开发 | 94 | | Opera | blink | 现在跟随chrome用blink内核。 | 95 | 96 | **拓展阅读:** 97 | ``` 98 | 移动端的浏览器内核主要说的是系统内置浏览器的内核。 99 | 100 | Android手机而言,使用率最高的就是Webkit内核,大部分国产浏览器宣称的自己的内核,基本上也是属于webkit二次开发。 101 | 102 | iOS以及WP7平台上,由于系统原因,系统大部分自带浏览器内核,一般是Safari或者IE内核Trident的 103 | ``` 104 | 105 | ## 3. Web标准(重点) 106 | 107 | 目标 108 | 109 | * 记忆 110 | * 能说出网页 中 web 标准三层组成 111 | * 理解 112 | * 能结合人来表述web标准三层 113 | 114 | Web标准不是某一个标准,而是由W3C组织和其他标准化组织制定的一系列标准的集合。 115 | 116 | W3C 万维网联盟是国际最著名的标准化组织。1994年成立后,至今已发布近百项相关万维网的标准,对万维网发展做出了杰出的贡献。 117 | 118 | **w3c就类似于现实世界中的联合国。** 119 | 120 | ### 3.1 为什么要遵循WEB标准呢? 121 | 122 | 通过以上浏览器不同内核不同,我们知道他们显示页面或者排版就有些许差异。 123 | 124 | 125 | 126 | ### 3.2 Web 标准的好处 127 | 128 | 遵循web标准可以让不同我们写的页面更标准更统一外,还有许多优点 129 | 130 | *1*、让Web的发展前景更广阔 131 | *2*、内容能被更广泛的设备访问 132 | *3*、更容易被搜寻引擎搜索 133 | *4*、降低网站流量费用 134 | *5*、使网站更易于维护 135 | *6*、提高页面浏览速度 136 | 137 | ### 3.3 Web 标准构成 138 | 139 | **构成:** 主要包括结构(Structure)、表现(Presentation)和行为(Behavior)三个方面。 140 | 141 | | 标准 | 说明 | 备注 | 142 | | :--- | :----------------------------------------------------------- | :----------------------------- | 143 | | 结构 | 结构用于对**网页元素**进行整理和分类,咱们主要学的是HTML。 | | 144 | | 表现 | 表现用于设置网页元素的版式、颜色、大小等**外观样式**,主要指的是CSS | | 145 | | 行为 | 行为是指网页模型的定义及**交互**的编写,咱们主要学的是 Javascript | | 146 | 147 | 理想状态我们的源码: .HTML .css .js 148 | 149 | 150 | 151 | **结合人来记忆web标准:** 152 | 153 | * 结构标准: 是你天然的身体 154 | 155 | 156 | 157 | 158 | 159 | * 表现标准: 决定你是否打扮的美丽外观(衣服?化妆?) 160 | 161 | 162 | 163 | 164 | 165 | * 行为标准: 决定你是否有吸引人的行为(动作) 166 | 167 | **** 168 | 169 | ### web标准小结 170 | 171 | * web标准有三层结构,分别是结构(html)、表现(css)和行为(javascript) 172 | * 结构类似人的身体, 表现类似人的着装, 行为类似人的行为动作 173 | * 理想状态下,他们三层都是独立的, 放到不同的文件里面 174 | 175 | ## 4. 拓展@ 176 | 177 | * **介绍一下你对浏览器内核的理解?常见的浏览器内核有哪些?** 178 | 179 | 浏览器内核包括两部分,渲染引擎和js引擎。渲染引擎负责读取网页内容,整理讯息,计算网页的显示方式并显示页面,js引擎是解析执行js获取网页的动态效果。 后来 JS 引擎越来越独立,内核就倾向于只指渲染引擎。 180 | IE:Trident 181 | firefox:Gecko 182 | chrom、safari:webkit 183 | Opera:Presto 184 | Microsoft Edge:EdgeHTML 185 | 186 | 深度阅读:[五大主流浏览器内核的源起以及国内各大浏览器内核总结](http://blog.csdn.net/summer_15/article/details/71249203) -------------------------------------------------------------------------------- /jQuery笔记/README.md: -------------------------------------------------------------------------------- 1 | # jq 特点: 2 | 3 | 1.隐式迭代 4 | 2.链式编程 5 | 当操作是设置型元素:可以一直链式编程 6 | 当操作是获取型元素:不可以一直链式编程(断链) 7 | 8 | # 1.jq 的入口函数 9 | 10 | 1.$(function(){ 11 | 12 | }); 13 | 14 | 2.$(document).ready(function(){ 15 | 16 | }); 17 | 18 | 3.jQuery(function(){ 19 | 20 | }); 21 | 22 | # 2.dom 与就 jq 互转 23 | 24 | dom 对象无法使用 jq 对象里的方法; 25 | jq 对象无法使用 dom 对象的属性和方法; 26 | 27 | 1.dom 对象转 jq 对象: 28 | 29 | $("div") 30 | $(div) 31 | 32 | 2.jq 转 dom 对象: 33 | 34 | $("div")[0] 35 | 36 | 3.jq 转 dom 对象 37 | 38 | $("div").get(0) 39 | 40 | # 3.jq 选择器: 41 | 42 | id 选择器: $("#id") 获取指定的id元素 43 | 全选选择器: $("\*") 获取所有 44 | 类选择器: $(".class") 获取指定的class选择器 45 | 标签选择器: $("div) 获取同一类的所有元素 46 | 并集选择器: $("div,p,li") 47 | 后代选择器: $("div li") 48 | 交集选择器: $("div.current") 49 | 子代选择器: $("div>li") 50 | 51 | 扩展几个选择器: 52 | $('div.goback') 选取div中的类名为goback的元素 53 | $("[href]") 选取带有 href 属性的元素 54 | $(":button") 可以选取所有 type="button" 的 元素 和 115 | function fn(a) { 116 | alert(a) 117 | } 118 | 2. btn.onclick = function () { 119 | alert(1) 120 | } 121 | 3. btn.addEventListener("click", function () { 122 | alert(1) 123 | }) 124 | 125 | ## 清空事件的几种方式: 126 | 127 | 1. btn.onclick = function () { 128 | alert(1); 129 | btn.onclick = null; 130 | } 131 | 132 | 2. btn.addEventListener("click", fn) 133 | function fn() { 134 | alert(1); 135 | btn.removeEventListener("click", fn) 136 | } 137 | 138 | ## 事件流三个阶段 139 | 140 | 捕获 目标 冒泡 141 | 142 | 捕获: document--->html---body--->父元素--->目标元素; 143 | 冒泡: 目标元素--->父元素--->body--->html--->docuemnt 144 | 145 | 注意: 146 | 147 | 当处于目标阶段的时候 捕获与冒泡谁先定义先执行谁!! 148 | 任何事件都有捕获状态!!! 149 | 事件流与位置没有关系 只要是嵌套都会依次发生事件 150 | 事件对象(事件源参数 e) 151 | 152 | target: 153 | 154 | 点击了谁(最里层的元素); 155 | 156 | this: 157 | 158 | 绑定的事件 159 | 160 | ## 阻止浏览器默认行为: 161 | 162 | 1. e.preventDefault(); 163 | 2. return false; 164 | 165 | ## 阻止事件冒泡: 166 | 167 | e.stopPropagation(); 168 | 169 | ## 事件冒泡的应用场景---事件委托 170 | 171 | 给外层的元素绑定事件 通过 e.target 找到目标元素 在通过冒泡触发事件---事件委托 172 | 173 | 事件委托的好处: 174 | 175 | 减少内存空间 176 | 提高效率 提升浏览器的加载速度! 177 | 178 | ## 键盘事件 179 | 180 | keydown: 181 | 182 | 按下键盘 没有松开时候一直触发事件 183 | 184 | keyup: 185 | 186 | 弹起键盘时候触发; 187 | 188 | # bom 加载事件: 189 | 190 | 1.load window.onload = function(){} 等到页面元素,外部的 js,图片和引用其他的资源绘制完毕再加载事件。 191 | 2.DOMContentLoaded: 等到页面元素绘制完毕加会加载事件。 192 | 3.resize:当窗口发生变化的时候触发事件; 193 | 194 | ## 延时器: 只执行一次 当前函数里的内容 195 | 196 | setTimeout(function(){ 197 | console.log(1) 198 | },毫秒) 199 | 200 | ### 清除延时器的方式: 201 | 202 | 1.clearTimeout(timer) 203 | 204 | ## 定时器: 重复执行 当前函数里的内容 205 | 206 | setInterval(function () { 207 | console.log(1) 208 | },毫秒数) 209 | 210 | ## this 指向: 211 | 212 | this 当调用时候确定 this 指向 , 当定义时候不能确定 this 指向!! 213 | 214 | 1.普通函数调用-------指向的是 window(永远); 215 | 2.方法调用-----当前调用的对象 事件----当前调用的对象 216 | 3.构造函数调用:高级回来!!!!! call apply bind(); 217 | 4. setInterval(function () { 218 | console.log(this) //window 219 | },毫秒数) 220 | 221 | ## javascript 单线程: 222 | 223 | 同一时间只能做一件事 上做完之后再继续执行下一件事 224 | 225 | 同步:做一件事 造成性能问题; 226 | 异步:做多个事 当执行主线程的内容 定时器放在任务队列里面 227 | 228 | ## javascript 运行机制: 229 | 230 | 1.先执行主线程里的代码 231 | 2.当发现 定时器 会把定时器 放到任务对列里面去执行 232 | 3.继续向下执行等主线程的所有代码执行完毕之后再去执行任务队列里的代码 233 | 4.循环去任务队列里面去执行代码 (事件循环) 234 | 5.执行完之后把任务队列清空; 235 | 236 | 放到任务队里的东西: 237 | 238 | 定时器 延时器 ajax 事件 es6---promise 239 | 240 | setInterval setTimeout 0 误差--(0.4-10s) 241 | 242 | ## location 对象: 243 | 244 | ### 属性: 245 | 246 | href:设置或者获取地址栏信息路径 247 | search: 获取地址栏参数 ?name=kf&age=18 248 | pathname:返回路径 249 | host:主机名 250 | port:端口号; 251 | 252 | ### offset 与 style 253 | 254 | offset: 获取的是内部样式 不带单位 获取元素位置 255 | style:获取行内样式 带单位 不包含 padding 及 border 设置元素位置 256 | 257 | ## 立即执行函数: 258 | 259 | (function(){ 260 | var num =19; 261 | }){} 262 | 263 | 目的:创建一个封闭的区域,避免变量的污染 264 | 265 | ### 垃圾回收机制: 266 | 267 | 全局作用域下的变量 不会销毁 268 | 局部作用域下的变量 当关闭浏览器立刻销毁 269 | 270 | 271 | ### 坐标系列: 272 | 273 | 3 组大小位置相关的属性: 274 | 275 | 1.offset: 276 | 277 | 1.offsetwidth:获取当前元素的宽度(包含 width+padding+border) 278 | 2.offsetHeight:获取当前元素的高度(包含 width+padding+border) 279 | 3.offsetLeft:获取当前元素距离带有定位父元素的坐标 280 | 4.offsetTop:获取当前元素距离带有定位父元素的坐标 281 | 5.offsetParent:获取带有定位的最近父元素 282 | 283 | offset与style 284 | offset:获取的是内部样式不带单位获取元素位置 285 | style:获取行内样式带单位不包含padding及border设置元素位置 286 | 287 | 2.client: 288 | 289 | clientLeft:获取的是边框的宽度 290 | clienttop:获取的是边框的宽度 291 | clientwidth:获取的是内容的宽度 width+padding不包含边框 292 | clientHeight:获取的是内容的高度 width+padding 不包含边框 293 | 294 | 3.scrol1 295 | 296 | scrollwidth:内容的大小(包含padding和未显示的内容)不包含滚动条 297 | scro11Height:内容的大小(包含padding和未显示的内容)不包含滚动条 298 | scrollLeft:内容滚动出去的大小 299 | scrol1Top:内容滚动出去的大小 300 | 301 | 1.onscrol1窗口事件 302 | 2.页面滚动出去的距离>banner距离页面的距离侧边栏改成固定定位位置:侧边栏距离页面的距离-banner距离页面的距离 303 | 3.如果超出 304 | 4.如果不超出侧边栏改成绝对定位位置:300px 305 | 5.如果页面滚动出去的距离>main距离页面的距离显示文字否则隐藏 306 | -------------------------------------------------------------------------------- /HTML笔记/02-认识HTML.md: -------------------------------------------------------------------------------- 1 | --- 2 | typora-copy-images-to: media 3 | --- 4 | 5 | > 第01阶段.前端基础.认识HTML 6 | ## 学习目标 7 | 8 | - 理解 9 | - HTML的概念 10 | - HTML标签的分类 11 | - HTML标签的关系 12 | - HTML标签的语义化 13 | - 应用 14 | - HTML骨架格式 15 | - sublime基本使用 16 | 17 | # 1. HTML 初识 18 | 19 | - HTML 指的是超文本标记语言 (**H**yper **T**ext **M**arkup **L**anguage)是用来描述网页的一种语言。 20 | - HTML 不是一种编程语言,而是一种标记语言 (markup language) 21 | - 标记语言是一套标记标签 (markup tag) 22 | 23 | **pink老师 一句话说出html作用:** 24 | 25 | > 网页是由网页元素组成的 , 这些元素是利用html标签描述出来,然后通过浏览器解析,就可以显示给用户了。 26 | 27 | **所谓超文本,有2层含义:** 28 | 29 | 1. 因为它可以加入图片、声音、动画、多媒体等内容(**超越文本限制 **) 30 | 2. 不仅如此,它还可以从一个文件跳转到另一个文件,与世界各地主机的文件连接(**超级链接文本 **)。 31 | 32 | ```html 33 | 34 | ``` 35 | 36 | **门外汉眼中的效果页面** 37 | 38 | 39 | 40 | **我们要做的html页面** 41 | 42 | 43 | 44 | **html 总结:** 45 | 46 | * html 是超文本标记(标签)语言 47 | * 我们学习html 主要学习html标签 48 | * 我们用html标签描述网页元素。 比如 图片标签 、文字标签、链接标签等等 49 | * 标签有自己的语法规范,所有的html标签都是用 <> 表示的 50 | * H(很)T(甜)M(蜜)L(啦) 是很快乐的一件事情 51 | 52 | ## 1.1 HTML骨架标签 53 | 54 | 日常生活的书信,我们要遵循共同的约定。 55 | 56 | 57 | 58 | 同理:HTML 有自己的语言语法骨架格式:(要遵循,要专业) 要求务必非常流畅的默写下来。。 59 | 60 | ```html 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | ``` 69 | #### html骨架标签总结 70 | | 标签名 | 定义 | 说明 | 71 | | ---------------- | :----: | :----------------------------- | 72 | | | HTML标签 | 页面中最大的标签,我们成为 根标签 | 73 | | | 文档的头部 | 注意在head标签中我们必须要设置的标签是title | 74 | | | 文档的标题 | 让页面拥有一个属于自己的网页标题 | 75 | | | 文档的主体 | 元素包含文档的所有内容,页面内容 基本都是放到body里面的 | 76 | 77 | **课堂练习1: ** 78 | 79 | 书写我们的第一个HTML 页面。 80 | 81 | 1. 新建一个 01-html骨架标签 的 TXT 文件。 82 | 83 | 2. 里面写入刚才的HTML 骨架。 84 | 85 | 3. 把后缀名改为 .HTML。 86 | 87 | 4. 右击--谷歌浏览器打开。 88 | 89 | ```html 90 | 91 | 92 | 我的第一个页面 93 | 94 | 95 | 你我之间 黑马洗练 月薪过万 一飞冲天 96 | 97 | 98 | ``` 99 | 100 | 101 | 102 | 103 | 为了便于记忆,我们请出刚才要辞职回家养猪的二师兄来帮忙, 我称之为 猪八戒记忆法 104 | 105 | 106 | 107 | 108 | 109 | #### 团队约定大小写 110 | 111 | HTML标签名、类名、标签属性和大部分属性值统一用小写 112 | 113 | *推荐:* 114 | 115 | ``` 116 | 117 | 我的第一个页面 118 | 119 | ``` 120 | 121 | *不推荐:* 122 | 123 | ``` 124 | 125 | 我的第一个页面 126 | 127 | ``` 128 | 129 | ## 1.2 HTML元素标签分类 130 | 131 | **标签:** 132 | 133 | 在HTML页面中,带有“< >”符号的元素被称为HTML标签,如上面提到的 <html>、<head>、<body>都是HTML骨架结构标签。 134 | 135 | **分类:** 136 | 137 | 1. 常规元素(双标签) 138 | 139 | ```html 140 | <标签名> 内容 比如 我是文字 141 | ``` 142 | 143 | * 该语法中“<标签名>”表示该标签的作用开始,一般称为“开始标签(start tag)”,“” 表示该标签的作用结束,一般称为“结束标签(end tag)”。 144 | * 和开始标签相比,结束标签只是在前面加了一个关闭符“/”。 145 | * 我们以后接触的基本都是双标签 146 | 147 | 2. 空元素(单标签) 148 | 149 | ```html 150 | <标签名 /> 比如
151 | ``` 152 | 153 | * 空元素 用单标签来表示, 简单点说,就是里面不需要包含内容, 只有一个开始标签不需要关闭。 154 | * 这种单身狗标签非常少,一共没多少,我们多记忆就好 155 | 156 | **pink老师 一句话说出他们:** 157 | 158 | > 世界上单身狗毕竟是少数的, 大部分还是喜欢成双成对,不要拉下你的另外一半,对待一个双标签要有始有终。 159 | 160 | ## 1.3 HTML标签关系 161 | 162 | 主要针对于**双标签** 的相互关系分为两种: 请大家务必熟悉记住这种标签关系,因为后面我们标签嵌套特别多,很容易弄混他们的关系。 163 | 164 | 1. 嵌套关系 165 | 166 | ```html 167 | 168 | 169 | 170 | ``` 171 | 172 | 173 | 174 | 2.并列关系 175 | 176 | ```html 177 | 178 | 179 | ``` 180 | 181 | 182 | 183 | **倡议:** 184 | 185 | > ```html 186 | > 如果两个标签之间的关系是嵌套关系,子元素最好缩进一个tab键的身位(一个tab是4个空格)。如果是并列关系,最好上下对齐。 187 | > ``` 188 | 189 | 190 | 191 | **pink老师 一句话说出他们:** 192 | 193 | > html双标签 可以分为 有 一种是 父子级 包含关系的标签 一种是 兄弟级 并列关系的标签 194 | 195 | 196 | 197 | ## 1.4 课堂一练 198 | 199 | **请问下列哪组标签关系是错误的? ** 200 | 201 | - [ ] 202 | 203 | 204 | - [ ]
205 | 206 | 207 | - [x] </head> 208 | 209 | 210 | - [ ]
211 | 212 | 213 | 214 | # 2. 代码开发工具(书写代码) 215 | 216 | - 为了提高我们的开发效率 217 | - 减少代码的出错我们不提倡用记事本开发,我们有更好的犀利哥。 218 | 219 | 220 | 221 | - Dreamweaver 222 | - SublimeText 223 | - WebStorm 224 | - HBuilder 225 | - VScode 226 | 227 | 有人说: 228 | 229 | 普通青年 Dreamweaver 230 | 231 | 文艺青年 sublime 232 | 233 | 高手和傻子 用记事本 234 | 235 | 其实。。。。 236 | 237 | 238 | 239 | 240 | 感觉: 这个feel 倍儿爽 feel feel倍儿爽 爽爽爽爽! 241 | 242 | 243 | 244 | 245 | sublime有非常多的优点, 最开心的就是非常轻量级,打开速度超快,后面更高的功能,后面再接触。 246 | 247 | **sublime生成html骨架小技巧** 248 | 249 | * 双击打开软件 250 | * 新建文件(ctrl+n) 251 | * 保存(ctrl+s),保存为:文件名.html ( 注意 后缀名必须是 .html ) 252 | * 放大缩小代码 按住 ctrl 在 滚动鼠标滚轮 或者 ctrl+ 加号 键 和 ctrl + 减号键 253 | * 生成页面骨架结构 254 | - html: 5 按下tab键 或者 255 | - ! 按下tab键 256 | * 在浏览器中预览页面 257 | - 右键在 浏览器中打开 258 | 259 | # 3. 文档类型 260 | 261 | **用法:** 262 | 263 | ```html 264 | 265 | ``` 266 | 267 | **作用:** 268 | 269 | 声明位于文档中的最前面的位置,处于 标签之前。此标签可告知浏览器文档使用哪种 HTML 或 XHTML 规范。 270 | 271 | **pink老师 一句话说出他们:** 272 | 273 | 就是告诉浏览器按照HTML5 规范解析页面. 274 | 275 | **团队约定:** 276 | 277 | > ``` 278 | > HTML文件必须加上 DOCTYPE 声明,并统一使用 HTML5 的文档声明 279 | > ``` 280 | 281 | # 4. 页面语言lang 282 | 283 | ~~~html 284 | 指定html 语言种类 285 | ~~~ 286 | 287 | 最常见的2个: 288 | 289 | 1. `en`定义语言为英语 290 | 2. `zh-CN`定义语言为中文 291 | 292 | **pink老师 一句话说出他们:** 293 | 294 | > 指定该html标签 内容 所用的语言为中文 295 | 296 | **团队约定:** 297 | 298 | > ``` 299 | > 考虑浏览器和操作系统的兼容性,目前仍然使用 zh-CN 属性值 300 | > ``` 301 | 302 | **@拓展阅读:** 303 | 304 | 简单来说,可能对于程序来说没有太大的作用,但是它可以告诉浏览器,搜索引擎,一些处理Html的程序对页面语言内容来做一些对应的处理或者事情。 305 | 比如可以 306 | 307 | - 根据根据lang属性来设定不同语言的css样式,或者字体 308 | - 告诉搜索引擎做精确的识别 309 | - 让语法检查程序做语言识别 310 | - 帮助翻译工具做识别 311 | - 帮助网页阅读程序做识别 312 | 等等 313 | 314 | # 5. 字符集 315 | 316 | ~~~html 317 | 318 | ~~~ 319 | 320 | ~~~ 321 | 字符集(Character set)是多个字符的集合。 322 | 323 | 计算机要准确的处理各种字符集文字,需要进行字符编码,以便计算机能够识别和存储各种文字。 324 | ~~~ 325 | 326 | utf-8是目前最常用的字符集编码方式,常用的字符集编码方式还有gbk和gb2312。 327 | 328 | * gb2312 简单中文 包括6763个汉字 GUO BIAO 329 | * BIG5 繁体中文 港澳台等用 330 | * GBK包含全部中文字符 是GB2312的扩展,加入对繁体字的支持,兼容GB2312 331 | * UTF-8则基本包含全世界所有国家需要用到的字符 332 | * **这句代码非常关键, 是必须要写的代码,否则可能引起乱码的情况。** 333 | 334 | **pink老师 一句话说出他们:** 335 | 336 | > 这句话是让 html 文件是以 UTF-8 编码保存的, 浏览器根据编码去解码对应的html内容。 337 | 338 | **团队约定:** 339 | 340 | > ``` 341 | > 一般情况下统一使用 "UTF-8" 编码, 请尽量统一写成标准的 "UTF-8",不要写成 "utf-8" 或 "utf8" 或 "UTF8"。 342 | > ``` 343 | 344 | # 6. HTML标签的语义化 345 | 346 | 白话: 所谓标签语义化,就是指标签的含义。 347 | 348 | **pink老师 一句话说出语义化目的:** 349 | 350 | > 根据标签的语义,在合适的地方给一个最为合理的标签,让结构更清晰。 351 | 352 | 1. 方便代码的阅读和维护 353 | 2. 同时让浏览器或是网络爬虫可以很好地解析,从而更好分析其中的内容 354 | 3. 使用语义化标签会具有更好地搜索引擎优化 355 | 356 | 357 | 358 | 359 | 360 | 语义是否良好: 当我们去掉CSS之后,网页结构依然组织有序,并且有良好的可读性。( 裸奔起来一样好看 ) 361 | 362 | 遵循的原则:先确定语义的HTML ,再选合适的CSS。所以,**我们接下来学习html标签,要根据语义去记忆。** HTML网页中任何元素的实现都要依靠HTML标签。 363 | 364 | # 7. 拓展阅读@ 365 | 366 | ## 单身狗的由来 367 | 368 | 单身狗一词最早是出自网络社区,起源与大话西游有关。 369 | 370 | 大话西游之大圣娶亲最后一幕“他好像一条狗”由来。 371 | 372 | 373 | 374 | -------------------------------------------------------------------------------- /normalize.css-master/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | /* Document 4 | ========================================================================== */ 5 | 6 | /** 7 | * 1. Correct the line height in all browsers. 8 | * 2. Prevent adjustments of font size after orientation changes in iOS. 9 | */ 10 | 11 | html { 12 | line-height: 1.15; /* 1 */ 13 | -webkit-text-size-adjust: 100%; /* 2 */ 14 | } 15 | 16 | /* Sections 17 | ========================================================================== */ 18 | 19 | /** 20 | * Remove the margin in all browsers. 21 | */ 22 | 23 | body { 24 | margin: 0; 25 | } 26 | 27 | /** 28 | * Render the `main` element consistently in IE. 29 | */ 30 | 31 | main { 32 | display: block; 33 | } 34 | 35 | /** 36 | * Correct the font size and margin on `h1` elements within `section` and 37 | * `article` contexts in Chrome, Firefox, and Safari. 38 | */ 39 | 40 | h1 { 41 | font-size: 2em; 42 | margin: 0.67em 0; 43 | } 44 | 45 | /* Grouping content 46 | ========================================================================== */ 47 | 48 | /** 49 | * 1. Add the correct box sizing in Firefox. 50 | * 2. Show the overflow in Edge and IE. 51 | */ 52 | 53 | hr { 54 | box-sizing: content-box; /* 1 */ 55 | height: 0; /* 1 */ 56 | overflow: visible; /* 2 */ 57 | } 58 | 59 | /** 60 | * 1. Correct the inheritance and scaling of font size in all browsers. 61 | * 2. Correct the odd `em` font sizing in all browsers. 62 | */ 63 | 64 | pre { 65 | font-family: monospace, monospace; /* 1 */ 66 | font-size: 1em; /* 2 */ 67 | } 68 | 69 | /* Text-level semantics 70 | ========================================================================== */ 71 | 72 | /** 73 | * Remove the gray background on active links in IE 10. 74 | */ 75 | 76 | a { 77 | background-color: transparent; 78 | } 79 | 80 | /** 81 | * 1. Remove the bottom border in Chrome 57- 82 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 83 | */ 84 | 85 | abbr[title] { 86 | border-bottom: none; /* 1 */ 87 | text-decoration: underline; /* 2 */ 88 | text-decoration: underline dotted; /* 2 */ 89 | } 90 | 91 | /** 92 | * Add the correct font weight in Chrome, Edge, and Safari. 93 | */ 94 | 95 | b, 96 | strong { 97 | font-weight: bolder; 98 | } 99 | 100 | /** 101 | * 1. Correct the inheritance and scaling of font size in all browsers. 102 | * 2. Correct the odd `em` font sizing in all browsers. 103 | */ 104 | 105 | code, 106 | kbd, 107 | samp { 108 | font-family: monospace, monospace; /* 1 */ 109 | font-size: 1em; /* 2 */ 110 | } 111 | 112 | /** 113 | * Add the correct font size in all browsers. 114 | */ 115 | 116 | small { 117 | font-size: 80%; 118 | } 119 | 120 | /** 121 | * Prevent `sub` and `sup` elements from affecting the line height in 122 | * all browsers. 123 | */ 124 | 125 | sub, 126 | sup { 127 | font-size: 75%; 128 | line-height: 0; 129 | position: relative; 130 | vertical-align: baseline; 131 | } 132 | 133 | sub { 134 | bottom: -0.25em; 135 | } 136 | 137 | sup { 138 | top: -0.5em; 139 | } 140 | 141 | /* Embedded content 142 | ========================================================================== */ 143 | 144 | /** 145 | * Remove the border on images inside links in IE 10. 146 | */ 147 | 148 | img { 149 | border-style: none; 150 | } 151 | 152 | /* Forms 153 | ========================================================================== */ 154 | 155 | /** 156 | * 1. Change the font styles in all browsers. 157 | * 2. Remove the margin in Firefox and Safari. 158 | */ 159 | 160 | button, 161 | input, 162 | optgroup, 163 | select, 164 | textarea { 165 | font-family: inherit; /* 1 */ 166 | font-size: 100%; /* 1 */ 167 | line-height: 1.15; /* 1 */ 168 | margin: 0; /* 2 */ 169 | } 170 | 171 | /** 172 | * Show the overflow in IE. 173 | * 1. Show the overflow in Edge. 174 | */ 175 | 176 | button, 177 | input { /* 1 */ 178 | overflow: visible; 179 | } 180 | 181 | /** 182 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 183 | * 1. Remove the inheritance of text transform in Firefox. 184 | */ 185 | 186 | button, 187 | select { /* 1 */ 188 | text-transform: none; 189 | } 190 | 191 | /** 192 | * Correct the inability to style clickable types in iOS and Safari. 193 | */ 194 | 195 | button, 196 | [type="button"], 197 | [type="reset"], 198 | [type="submit"] { 199 | -webkit-appearance: button; 200 | } 201 | 202 | /** 203 | * Remove the inner border and padding in Firefox. 204 | */ 205 | 206 | button::-moz-focus-inner, 207 | [type="button"]::-moz-focus-inner, 208 | [type="reset"]::-moz-focus-inner, 209 | [type="submit"]::-moz-focus-inner { 210 | border-style: none; 211 | padding: 0; 212 | } 213 | 214 | /** 215 | * Restore the focus styles unset by the previous rule. 216 | */ 217 | 218 | button:-moz-focusring, 219 | [type="button"]:-moz-focusring, 220 | [type="reset"]:-moz-focusring, 221 | [type="submit"]:-moz-focusring { 222 | outline: 1px dotted ButtonText; 223 | } 224 | 225 | /** 226 | * Correct the padding in Firefox. 227 | */ 228 | 229 | fieldset { 230 | padding: 0.35em 0.75em 0.625em; 231 | } 232 | 233 | /** 234 | * 1. Correct the text wrapping in Edge and IE. 235 | * 2. Correct the color inheritance from `fieldset` elements in IE. 236 | * 3. Remove the padding so developers are not caught out when they zero out 237 | * `fieldset` elements in all browsers. 238 | */ 239 | 240 | legend { 241 | box-sizing: border-box; /* 1 */ 242 | color: inherit; /* 2 */ 243 | display: table; /* 1 */ 244 | max-width: 100%; /* 1 */ 245 | padding: 0; /* 3 */ 246 | white-space: normal; /* 1 */ 247 | } 248 | 249 | /** 250 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 251 | */ 252 | 253 | progress { 254 | vertical-align: baseline; 255 | } 256 | 257 | /** 258 | * Remove the default vertical scrollbar in IE 10+. 259 | */ 260 | 261 | textarea { 262 | overflow: auto; 263 | } 264 | 265 | /** 266 | * 1. Add the correct box sizing in IE 10. 267 | * 2. Remove the padding in IE 10. 268 | */ 269 | 270 | [type="checkbox"], 271 | [type="radio"] { 272 | box-sizing: border-box; /* 1 */ 273 | padding: 0; /* 2 */ 274 | } 275 | 276 | /** 277 | * Correct the cursor style of increment and decrement buttons in Chrome. 278 | */ 279 | 280 | [type="number"]::-webkit-inner-spin-button, 281 | [type="number"]::-webkit-outer-spin-button { 282 | height: auto; 283 | } 284 | 285 | /** 286 | * 1. Correct the odd appearance in Chrome and Safari. 287 | * 2. Correct the outline style in Safari. 288 | */ 289 | 290 | [type="search"] { 291 | -webkit-appearance: textfield; /* 1 */ 292 | outline-offset: -2px; /* 2 */ 293 | } 294 | 295 | /** 296 | * Remove the inner padding in Chrome and Safari on macOS. 297 | */ 298 | 299 | [type="search"]::-webkit-search-decoration { 300 | -webkit-appearance: none; 301 | } 302 | 303 | /** 304 | * 1. Correct the inability to style clickable types in iOS and Safari. 305 | * 2. Change font properties to `inherit` in Safari. 306 | */ 307 | 308 | ::-webkit-file-upload-button { 309 | -webkit-appearance: button; /* 1 */ 310 | font: inherit; /* 2 */ 311 | } 312 | 313 | /* Interactive 314 | ========================================================================== */ 315 | 316 | /* 317 | * Add the correct display in Edge, IE 10+, and Firefox. 318 | */ 319 | 320 | details { 321 | display: block; 322 | } 323 | 324 | /* 325 | * Add the correct display in all browsers. 326 | */ 327 | 328 | summary { 329 | display: list-item; 330 | } 331 | 332 | /* Misc 333 | ========================================================================== */ 334 | 335 | /** 336 | * Add the correct display in IE 10+. 337 | */ 338 | 339 | template { 340 | display: none; 341 | } 342 | 343 | /** 344 | * Add the correct display in IE 10. 345 | */ 346 | 347 | [hidden] { 348 | display: none; 349 | } 350 | -------------------------------------------------------------------------------- /CSS三角生成工具/js/utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Utilities 4 | * Author: Stefan Petre www.eyecon.ro 5 | * 6 | */ 7 | (function($) { 8 | EYE.extend({ 9 | getPosition : function(e, forceIt) 10 | { 11 | var x = 0; 12 | var y = 0; 13 | var es = e.style; 14 | var restoreStyles = false; 15 | if (forceIt && jQuery.curCSS(e,'display') == 'none') { 16 | var oldVisibility = es.visibility; 17 | var oldPosition = es.position; 18 | restoreStyles = true; 19 | es.visibility = 'hidden'; 20 | es.display = 'block'; 21 | es.position = 'absolute'; 22 | } 23 | var el = e; 24 | if (el.getBoundingClientRect) { // IE 25 | var box = el.getBoundingClientRect(); 26 | x = box.left + Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) - 2; 27 | y = box.top + Math.max(document.documentElement.scrollTop, document.body.scrollTop) - 2; 28 | } else { 29 | x = el.offsetLeft; 30 | y = el.offsetTop; 31 | el = el.offsetParent; 32 | if (e != el) { 33 | while (el) { 34 | x += el.offsetLeft; 35 | y += el.offsetTop; 36 | el = el.offsetParent; 37 | } 38 | } 39 | if (jQuery.browser.safari && jQuery.curCSS(e, 'position') == 'absolute' ) { 40 | x -= document.body.offsetLeft; 41 | y -= document.body.offsetTop; 42 | } 43 | el = e.parentNode; 44 | while (el && el.tagName.toUpperCase() != 'BODY' && el.tagName.toUpperCase() != 'HTML') 45 | { 46 | if (jQuery.curCSS(el, 'display') != 'inline') { 47 | x -= el.scrollLeft; 48 | y -= el.scrollTop; 49 | } 50 | el = el.parentNode; 51 | } 52 | } 53 | if (restoreStyles == true) { 54 | es.display = 'none'; 55 | es.position = oldPosition; 56 | es.visibility = oldVisibility; 57 | } 58 | return {x:x, y:y}; 59 | }, 60 | getSize : function(e) 61 | { 62 | var w = parseInt(jQuery.curCSS(e,'width'), 10); 63 | var h = parseInt(jQuery.curCSS(e,'height'), 10); 64 | var wb = 0; 65 | var hb = 0; 66 | if (jQuery.curCSS(e, 'display') != 'none') { 67 | wb = e.offsetWidth; 68 | hb = e.offsetHeight; 69 | } else { 70 | var es = e.style; 71 | var oldVisibility = es.visibility; 72 | var oldPosition = es.position; 73 | es.visibility = 'hidden'; 74 | es.display = 'block'; 75 | es.position = 'absolute'; 76 | wb = e.offsetWidth; 77 | hb = e.offsetHeight; 78 | es.display = 'none'; 79 | es.position = oldPosition; 80 | es.visibility = oldVisibility; 81 | } 82 | return {w:w, h:h, wb:wb, hb:hb}; 83 | }, 84 | getClient : function(e) 85 | { 86 | var h, w; 87 | if (e) { 88 | w = e.clientWidth; 89 | h = e.clientHeight; 90 | } else { 91 | var de = document.documentElement; 92 | w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; 93 | h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; 94 | } 95 | return {w:w,h:h}; 96 | }, 97 | getScroll : function (e) 98 | { 99 | var t=0, l=0, w=0, h=0, iw=0, ih=0; 100 | if (e && e.nodeName.toLowerCase() != 'body') { 101 | t = e.scrollTop; 102 | l = e.scrollLeft; 103 | w = e.scrollWidth; 104 | h = e.scrollHeight; 105 | } else { 106 | if (document.documentElement) { 107 | t = document.documentElement.scrollTop; 108 | l = document.documentElement.scrollLeft; 109 | w = document.documentElement.scrollWidth; 110 | h = document.documentElement.scrollHeight; 111 | } else if (document.body) { 112 | t = document.body.scrollTop; 113 | l = document.body.scrollLeft; 114 | w = document.body.scrollWidth; 115 | h = document.body.scrollHeight; 116 | } 117 | if (typeof pageYOffset != 'undefined') { 118 | t = pageYOffset; 119 | l = pageXOffset; 120 | } 121 | iw = self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0; 122 | ih = self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0; 123 | } 124 | return { t: t, l: l, w: w, h: h, iw: iw, ih: ih }; 125 | }, 126 | getMargins : function(e, toInteger) 127 | { 128 | var t = jQuery.curCSS(e,'marginTop') || ''; 129 | var r = jQuery.curCSS(e,'marginRight') || ''; 130 | var b = jQuery.curCSS(e,'marginBottom') || ''; 131 | var l = jQuery.curCSS(e,'marginLeft') || ''; 132 | if (toInteger) 133 | return { 134 | t: parseInt(t, 10)||0, 135 | r: parseInt(r, 10)||0, 136 | b: parseInt(b, 10)||0, 137 | l: parseInt(l, 10) 138 | }; 139 | else 140 | return {t: t, r: r, b: b, l: l}; 141 | }, 142 | getPadding : function(e, toInteger) 143 | { 144 | var t = jQuery.curCSS(e,'paddingTop') || ''; 145 | var r = jQuery.curCSS(e,'paddingRight') || ''; 146 | var b = jQuery.curCSS(e,'paddingBottom') || ''; 147 | var l = jQuery.curCSS(e,'paddingLeft') || ''; 148 | if (toInteger) 149 | return { 150 | t: parseInt(t, 10)||0, 151 | r: parseInt(r, 10)||0, 152 | b: parseInt(b, 10)||0, 153 | l: parseInt(l, 10) 154 | }; 155 | else 156 | return {t: t, r: r, b: b, l: l}; 157 | }, 158 | getBorder : function(e, toInteger) 159 | { 160 | var t = jQuery.curCSS(e,'borderTopWidth') || ''; 161 | var r = jQuery.curCSS(e,'borderRightWidth') || ''; 162 | var b = jQuery.curCSS(e,'borderBottomWidth') || ''; 163 | var l = jQuery.curCSS(e,'borderLeftWidth') || ''; 164 | if (toInteger) 165 | return { 166 | t: parseInt(t, 10)||0, 167 | r: parseInt(r, 10)||0, 168 | b: parseInt(b, 10)||0, 169 | l: parseInt(l, 10)||0 170 | }; 171 | else 172 | return {t: t, r: r, b: b, l: l}; 173 | }, 174 | traverseDOM : function(nodeEl, func) 175 | { 176 | func(nodeEl); 177 | nodeEl = nodeEl.firstChild; 178 | while(nodeEl){ 179 | EYE.traverseDOM(nodeEl, func); 180 | nodeEl = nodeEl.nextSibling; 181 | } 182 | }, 183 | getInnerWidth : function(el, scroll) { 184 | var offsetW = el.offsetWidth; 185 | return scroll ? Math.max(el.scrollWidth,offsetW) - offsetW + el.clientWidth:el.clientWidth; 186 | }, 187 | getInnerHeight : function(el, scroll) { 188 | var offsetH = el.offsetHeight; 189 | return scroll ? Math.max(el.scrollHeight,offsetH) - offsetH + el.clientHeight:el.clientHeight; 190 | }, 191 | getExtraWidth : function(el) { 192 | if($.boxModel) 193 | return (parseInt($.curCSS(el, 'paddingLeft'))||0) 194 | + (parseInt($.curCSS(el, 'paddingRight'))||0) 195 | + (parseInt($.curCSS(el, 'borderLeftWidth'))||0) 196 | + (parseInt($.curCSS(el, 'borderRightWidth'))||0); 197 | return 0; 198 | }, 199 | getExtraHeight : function(el) { 200 | if($.boxModel) 201 | return (parseInt($.curCSS(el, 'paddingTop'))||0) 202 | + (parseInt($.curCSS(el, 'paddingBottom'))||0) 203 | + (parseInt($.curCSS(el, 'borderTopWidth'))||0) 204 | + (parseInt($.curCSS(el, 'borderBottomWidth'))||0); 205 | return 0; 206 | }, 207 | isChildOf: function(parentEl, el, container) { 208 | if (parentEl == el) { 209 | return true; 210 | } 211 | if (!el || !el.nodeType || el.nodeType != 1) { 212 | return false; 213 | } 214 | if (parentEl.contains && !$.browser.safari) { 215 | return parentEl.contains(el); 216 | } 217 | if ( parentEl.compareDocumentPosition ) { 218 | return !!(parentEl.compareDocumentPosition(el) & 16); 219 | } 220 | var prEl = el.parentNode; 221 | while(prEl && prEl != container) { 222 | if (prEl == parentEl) 223 | return true; 224 | prEl = prEl.parentNode; 225 | } 226 | return false; 227 | }, 228 | centerEl : function(el, axis) 229 | { 230 | var clientScroll = EYE.getScroll(); 231 | var size = EYE.getSize(el); 232 | if (!axis || axis == 'vertically') 233 | $(el).css( 234 | { 235 | top: clientScroll.t + ((Math.min(clientScroll.h,clientScroll.ih) - size.hb)/2) + 'px' 236 | } 237 | ); 238 | if (!axis || axis == 'horizontally') 239 | $(el).css( 240 | { 241 | left: clientScroll.l + ((Math.min(clientScroll.w,clientScroll.iw) - size.wb)/2) + 'px' 242 | } 243 | ); 244 | } 245 | }); 246 | if (!$.easing.easeout) { 247 | $.easing.easeout = function(p, n, firstNum, delta, duration) { 248 | return -delta * ((n=n/duration-1)*n*n*n - 1) + firstNum; 249 | }; 250 | } 251 | 252 | })(jQuery); -------------------------------------------------------------------------------- /HTML笔记/05-列表和表单.md: -------------------------------------------------------------------------------- 1 | --- 2 | typora-copy-images-to: media 3 | --- 4 | 5 | > 第01阶段.前端基础.列表和表单 6 | # 1. 列表标签(重点) 7 | 8 | ## 学习目标 9 | 10 | - 理解 11 | - 无序列表的应用场景 12 | - 自定义列表的应用场景 13 | - 应用 14 | - 无序列表语法 15 | - 自定义列表语法 16 | 17 | 问? 18 | 19 | 前面我们知道表格一般用于数据展示的,但是网页中还是有很多跟表格类似的布局,如下图~~ 我们用什么做呢? 20 | 21 | 22 | 23 | 答: 24 | 25 | 答案是列表, 那什么是列表? 表格是用来显示数据的,那么列表就是用来布局的。 因为非常整齐和自由 26 | 27 | 28 | 29 | - 概念: 30 | 31 | 容器里面装载着结构,样式一致的文字或图表的一种形式,叫列表 32 | 33 | - 特点: 34 | 35 | 列表最大的特点就是 整齐 、整洁、 有序,跟表格类似,但是他可组合自由度会更高。 36 | 37 | ## 1.1 无序列表 ul (重点) 38 | 39 | 无序列表的各个列表项之间没有顺序级别之分,是并列的。其基本语法格式如下: 40 | 41 | ```html 42 |
    43 |
  • 列表项1
  • 44 |
  • 列表项2
  • 45 |
  • 列表项3
  • 46 | ...... 47 |
48 | ``` 49 | 50 | 比如下面这些,新闻是没有顺序的,不用排队,先到先得,后发布先显示。 51 | 52 | 53 | 54 | **脚下留心:** 55 | 56 | ``` 57 | 1.
    中只能嵌套
  • ,直接在
      标签中输入其他标签或者文字的做法是不被允许的。 58 | 2.
    • 之间相当于一个容器,可以容纳所有元素。 59 | 3. 无序列表会带有自己样式属性,放下那个样式,一会让CSS来! 60 | ``` 61 | 62 | ## 1.2 有序列表 ol (了解) 63 | 64 | 65 | 66 | 有序列表即为有排列顺序的列表,其各个列表项按照一定的顺序排列定义,有序列表的基本语法格式如下: 67 | 68 | ```html 69 |
        70 |
      1. 列表项1
      2. 71 |
      3. 列表项2
      4. 72 |
      5. 列表项3
      6. 73 | ...... 74 |
      75 | ``` 76 | 77 | 所有特性基本与ul 一致。 但是实际中比 无序列表 用的少很多。 78 | 79 | ## 1.3 自定义列表(理解) 80 | 81 | 定义列表常用于对术语或名词进行解释和描述,定义列表的列表项前没有任何项目符号。其基本语法如下: 82 | 83 | ```html 84 |
      85 |
      名词1
      86 |
      名词1解释1
      87 |
      名词1解释2
      88 | ... 89 |
      名词2
      90 |
      名词2解释1
      91 |
      名词2解释2
      92 | ... 93 |
      94 | ``` 95 | 96 | 97 | 98 | 99 | 100 | 用的还可以: 101 | 102 | 103 | 104 | 105 | 106 | ## 1.4 列表总结 107 | 108 | | 标签名 | 定义 | 说明 | 109 | | --------- | :----------: | :----------------------------------------------------- | 110 | |
        | **无序标签** | 里面只能包含li 没有顺序,我们以后布局中最常用的列表 | 111 | |
          | 有序标签 | 里面只能包含li 有顺序, 使用情况较少 | 112 | |
          | 自定义列表 | 里面有2个兄弟, dt 和 dd | 113 | 114 | 我们现在还没有学布局,现在只要保证2个点: 115 | 116 | 1. 学会什么时候用无序列表, 学会什么时候用自定义列表 117 | 2. 无序列表和自定义列表代码怎么写? 118 | 3. 具体的我们刚才看的布局,等我们学了css 在来全面布局。 119 | 120 | # 2. 表单标签(掌握) 121 | 122 | 目标: 123 | 124 | * 能写出最常用的注册类表单 125 | * 能说出input表单常见属性 126 | 127 | 现实中的表单,类似我们去银行办理信用卡填写的单子。 如下图 128 | 129 | 130 | 131 | **作用: ** 132 | 133 | 表单目的是为了收集用户信息。 134 | 135 | 在我们网页中, 我们也需要跟用户进行交互,收集用户资料,此时也需要表单。 136 | 137 | > 在HTML中,一个完整的表单通常由表单控件(也称为表单元素)、提示信息和表单域3个部分构成。 138 | 139 | 140 | 141 | **表单控件: ** 142 | 143 | ​ 包含了具体的表单功能项,如单行文本输入框、密码输入框、复选框、提交按钮、重置按钮等。 144 | 145 | **提示信息:** 146 | 147 | ​ 一个表单中通常还需要包含一些说明性的文字,提示用户进行填写和操作。 148 | 149 | **表单域:** 150 | 151 | ​ 他相当于一个容器,用来容纳所有的表单控件和提示信息,可以通过他定义处理表单数据所用程序的url地址,以及数据提交到服务器的方法。如果不定义表单域,表单中的数据就无法传送到后台服务器。 152 | 153 | ## 2.1 input 控件(重点) 154 | 155 | - 语法: 156 | 157 | ```html 158 | 159 | ``` 160 | 161 | - input 输入的意思 162 | - 169 | 170 | 171 | 172 | #### 1. type 属性 173 | 174 | * 这个属性通过改变值,可以决定了你属于那种input表单。 175 | * 比如 type = 'text' 就表示 文本框 可以做 用户名, 昵称等。 176 | * 比如 type = 'password' 就是表示密码框 用户输入的内容 是不可见的。 177 | 178 | ```html 179 | 用户名: 180 | 密 码: 181 | ``` 182 | 183 | #### 2. value属性 值 184 | 185 | ```html 186 | 用户名: 187 | ``` 188 | 189 | * value 默认的文本值。 有些表单想刚打开页面就默认显示几个文字,就可以通过这个value 来设置。 190 | 191 | #### 3. name属性 192 | ~~~html 193 | 用户名: 194 | ~~~ 195 | 196 | name表单的名字, 这样,后台可以通过这个name属性找到这个表单。 页面中的表单很多,name主要作用就是用于区别不同的表单。 197 | 198 | * name属性后面的值,是我们自己定义的。 199 | 200 | 201 | * radio 如果是一组,我们必须给他们命名相同的名字 name 这样就可以多个选其中的一个啦 202 | 203 | ```html 204 | 男 205 | 女 206 | ``` 207 | 208 | * name属性,我们现在用的较少, 但是,当我们学ajax 和后台的时候,是必须的。 209 | 210 | #### 4. checked属性 211 | 212 | * 表示默认选中状态。 较常见于 单选按钮和复选按钮。 213 | 214 | ```html 215 | 性 别: 216 | 男 217 | 女 218 | ``` 219 | 220 | 上面这个,表示就默认选中了 男 这个单选按钮 221 | 222 | #### 5. input 属性小结 223 | 224 | | 属性 | 说明 | 作用 | 225 | | ------- | :------- | ------------------------------------------------------ | 226 | | type | 表单类型 | 用来指定不同的控件类型 | 227 | | value | 表单值 | 表单里面默认显示的文本 | 228 | | name | 表单名字 | 页面中的表单很多,name主要作用就是用于区别不同的表单。 | 229 | | checked | 默认选中 | 表示那个单选或者复选按钮一开始就被选中了 | 230 | 231 | ## 2.2 label标签(理解) 232 | 233 | **目标:** 234 | 235 | label标签主要目的是为了提高用户体验。 为用户提高最优秀的服务。 236 | 237 | **概念:** 238 | 239 | label 标签为 input 元素定义标注(标签)。 240 | 241 | **作用:** 242 | 243 | 用于绑定一个表单元素, 当点击label标签的时候, 被绑定的表单元素就会获得输入焦点。 244 | 245 | **如何绑定元素呢?** 246 | 247 | 1. 第一种用法就是用label直接包括input表单。 248 | 249 | ```html 250 | 251 | ``` 252 | 253 | 适合单个表单选择 254 | 255 | 2. 第二种用法 for 属性规定 label 与哪个表单元素绑定。 256 | 257 | ```html 258 | 259 | 260 | ``` 261 | 262 | **pink老师 一句话说出他们:** 263 | 264 | > 当我们鼠标点击 label标签里面的文字时, 光标会定位到指定的表单里面 265 | 266 | ## 2.3 textarea控件(文本域) 267 | 268 | 269 | 270 | - 语法: 271 | 272 | ```html 273 | 276 | ``` 277 | 278 | - 作用: 279 | 280 | 通过textarea控件可以轻松地创建多行文本输入框. 281 | 282 | cols="每行中的字符数" rows="显示的行数" 我们实际开发不用 283 | 284 | #### 文本框和文本域区别 285 | 286 | | 表单 | 名称 | 区别 | 默认值显示 | 用于场景 | 287 | | :---------------- | :--: | :------: | ---------------: | ---------: | 288 | | input type="text" | 文本框 | 只能显示一行文本 | 单标签,通过value显示默认值 | 用户名、昵称、密码等 | 289 | | textarea | 文本域 | 可以显示多行文本 | 双标签,默认值写到标签中间 | 留言板 | 290 | 291 | ## 2.4 select下拉列表 292 | 293 | **目的:** 294 | 295 | 如果有多个选项让用户选择,为了节约空间,我们可以使用select控件定义下拉列表. 296 | 297 | 298 | 299 | **语法:** 300 | 301 | ```html 302 | 308 | ``` 309 | 310 | * 注意: 311 | 312 | 1. <select> 中至少包含一对 option 313 | 2. 在option 中定义selected =" selected "时,当前项即为默认选中项。 314 | 3. 但是我们实际开发会用的比较少 315 | 316 | # 3. form表单域 317 | 318 | - 收集的用户信息怎么传递给服务器? 319 | 320 | 通过form表单域 321 | 322 | - 目的: 323 | 324 | 在HTML中,form标签被用于定义表单域,以实现用户信息的收集和传递,form中的所有内容都会被提交给服务器。 325 | 326 | **语法: ** 327 | 328 | ```html 329 |
          330 | 各种表单控件 331 |
          332 | ``` 333 | 334 | 335 | **常用属性:** 336 | 337 | | 属性 | 属性值 | 作用 | 338 | | ------ | :------- | --------------------------- | 339 | | action | url地址 | 用于指定接收并处理表单数据的服务器程序的url地址。 | 340 | | method | get/post | 用于设置表单数据的提交方式,其取值为get或post。 | 341 | | name | 名称 | 用于指定表单的名称,以区分同一个页面中的多个表单。 | 342 | 343 | **注意:** 344 | 345 | 每个表单都应该有自己表单域。我们现在做页面,不写看不到效果,但是 如果后面学 ajax 后台交互的时候,必须需要 form表单域。 346 | 347 | ## 2.6 团队约定 348 | 349 | ### 元素属性 350 | 351 | - 元素属性值使用双引号语法 352 | - 元素属性值可以写上的都写上 353 | 354 | *推荐:* 355 | 356 | ```html 357 | 358 | 359 | ``` 360 | 361 | *不推荐:* 362 | 363 | ```html 364 | 365 | 366 | 367 | ``` 368 | 369 | # 4.综合案例(注册页面) 370 | 371 | 372 | 373 | 374 | 375 | # 5. 查文档 376 | 377 | 经常查阅文档是一个非常好的学习习惯。 378 | 379 | W3C : http://www.w3school.com.cn/ 380 | 381 | MDN: https://developer.mozilla.org/zh-CN/ 382 | 383 | # 6. 总结 384 | 385 | -------------------------------------------------------------------------------- /normalize.css-master/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to normalize.css 2 | 3 | Please take a moment to review this document in order to make the contribution 4 | process easy and effective for everyone involved. 5 | 6 | Following these guidelines helps to communicate that you respect the time of 7 | the developers managing and developing this open source project. In return, 8 | they should reciprocate that respect in addressing your issue or assessing 9 | patches and features. 10 | 11 | 12 | ## Using the issue tracker 13 | 14 | The issue tracker is the preferred channel for [bug reports](#bugs), 15 | [features requests](#features) and [submitting pull 16 | requests](#pull-requests), but please respect the following restrictions: 17 | 18 | * Please **do not** use the issue tracker for personal support requests. 19 | 20 | * Please **do not** derail or troll issues. Keep the discussion on topic and 21 | respect the opinions of others. 22 | 23 | 24 | ## Bug reports 25 | 26 | A bug is a _demonstrable problem_ that is caused by the code in the repository. 27 | Good bug reports are extremely helpful - thank you! 28 | 29 | Guidelines for bug reports: 30 | 31 | 1. **Use the GitHub issue search** – check if the issue has already been 32 | reported. 33 | 34 | 2. **Check if the issue has been fixed** – try to reproduce it using the 35 | latest `master` branch in the repository. 36 | 37 | 3. **Isolate the problem** – create a live example (e.g., on 38 | [Codepen](http://codepen.io)) of a [reduced test 39 | case](http://css-tricks.com/6263-reduced-test-cases/). 40 | 41 | A good bug report shouldn't leave others needing to chase you up for more 42 | information. Please try to be as detailed as possible in your report. What is 43 | your environment? What steps will reproduce the issue? What browser(s) and OS 44 | experience the problem? What would you expect to be the outcome? All these 45 | details will help people to fix any potential bugs. 46 | 47 | Example: 48 | 49 | > Short and descriptive example bug report title 50 | > 51 | > A summary of the issue and the browser/OS environment in which it occurs. If 52 | > suitable, include the steps required to reproduce the bug. 53 | > 54 | > 1. This is the first step 55 | > 2. This is the second step 56 | > 3. Further steps, etc. 57 | > 58 | > `` - a link to the reduced test case 59 | > 60 | > Any other information you want to share that is relevant to the issue being 61 | > reported. This might include the lines of code that you have identified as 62 | > causing the bug, and potential solutions (and your opinions on their 63 | > merits). 64 | 65 | 66 | ## Feature requests 67 | 68 | Feature requests are welcome. But take a moment to find out whether your idea 69 | fits with the scope and aims of the project. It's up to *you* to make a strong 70 | case to convince the project's developers of the merits of this feature. Please 71 | provide as much detail and context as possible. 72 | 73 | 74 | ## Pull requests 75 | 76 | Good pull requests - patches, improvements, new features - are a fantastic 77 | help. They should remain focused in scope and avoid containing unrelated 78 | commits. 79 | 80 | **Please ask first** before embarking on any significant work, otherwise you 81 | risk spending a lot of time working on something that the project's developers 82 | might not want to merge into the project. 83 | 84 | Please adhere to the coding conventions used throughout a project (whitespace, 85 | accurate comments, etc.) and any other requirements (such as test coverage). 86 | 87 | Follow this process if you'd like your work considered for inclusion in the 88 | project: 89 | 90 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your 91 | fork, and configure the remotes: 92 | 93 | ```bash 94 | # Clone your fork of the repo into the current directory 95 | git clone https://github.com//normalize.css 96 | # Navigate to the newly cloned directory 97 | cd normalize.css 98 | # Assign the original repo to a remote called "upstream" 99 | git remote add upstream https://github.com/necolas/normalize.css 100 | ``` 101 | 102 | 2. If you cloned a while ago, get the latest changes from upstream: 103 | 104 | ```bash 105 | git checkout master 106 | git pull upstream master 107 | ``` 108 | 109 | 3. Never work directly on `master`. Create a new topic branch (off the latest 110 | version of `master`) to contain your feature, change, or fix: 111 | 112 | ```bash 113 | git checkout -b 114 | ``` 115 | 116 | 4. Commit your changes in logical chunks. Please adhere to these [git commit 117 | message conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) 118 | or your code is unlikely be merged into the main project. Use Git's 119 | [interactive rebase](https://help.github.com/articles/interactive-rebase) 120 | feature to tidy up your commits before making them public. 121 | 122 | Be sure to add a test to the `test.html` file if appropriate, and test 123 | your change in all supported browsers. 124 | 125 | 5. Locally rebase the upstream development branch into your topic branch: 126 | 127 | ```bash 128 | git pull --rebase upstream master 129 | ``` 130 | 131 | 6. Push your topic branch up to your fork: 132 | 133 | ```bash 134 | git push origin 135 | ``` 136 | 137 | 10. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) 138 | with a clear title and description. 139 | 140 | **IMPORTANT**: By submitting a patch, you agree to allow the project owner to 141 | license your work under the same license as that used by the project. 142 | 143 | ### CSS Conventions 144 | 145 | Keep the CSS file as readable as possible by following these guidelines: 146 | 147 | - Comments are short and to the point. 148 | - Comments without a number reference the entire rule. 149 | - Comments describe the selector when the selector does not make the 150 | normalization obvious. 151 | - Comments begin with “Correct the...” when they deal with less obvious side 152 | effects. 153 | - Rules are sorted by cascade, specificity, and then alphabetic order. 154 | - Selectors are sorted by specificity and then alphabetic order. 155 | - `in browser` applies to all versions. 156 | - `in browser v-` applies to all versions up to and including the version. 157 | - `in browser v+` applies to all versions after and including the version. 158 | - `in browser v-v` applies to all versions including and between the versions. 159 | 160 | 161 | ## Maintainers 162 | 163 | If you have commit access, please follow this process for merging patches and 164 | cutting new releases. 165 | 166 | ### Accepting patches 167 | 168 | 1. Check that a patch is within the scope and philosophy of the project. 169 | 2. Check that a patch has any necessary tests and a proper, descriptive commit 170 | message. 171 | 3. Test the patch locally. 172 | 4. Do not use GitHub's merge button. Apply the patch to `master` locally 173 | (either via `git am` or by checking the whole branch out). Amend minor 174 | problems with the author's original commit if necessary. Then push to GitHub. 175 | 176 | ### Releasing a new version 177 | 178 | 1. Include all new functional changes in the CHANGELOG. 179 | 2. Use a dedicated commit to increment the version. The version needs to be 180 | added to the CHANGELOG (inc. date), the `package.json`, and `normalize.css` 181 | files. 182 | 3. The commit message must be of `v0.0.0` format. 183 | 4. Create an annotated tag for the version: `git tag -m "v0.0.0" 0.0.0`. 184 | 5. Push the changes and tags to GitHub: `git push --tags origin master` 185 | 6. Checkout the `gh-pages` branch and follow the instructions in the README. 186 | 187 | ### Semver strategy 188 | 189 | [Semver](http://semver.org/) is a widely accepted method for deciding how 190 | version numbers are incremented in a project. Versions are written as 191 | MAJOR.MINOR.PATCH. 192 | 193 | Any change to CSS rules whatsoever is considered backwards-breaking and will 194 | result in a new **major** release. No changes to CSS rules can add 195 | functionality in a backwards-compatible manner, therefore no changes are 196 | considered **minor**. Others changes with no impact on rendering are considered 197 | backwards-compatible and will result in a new **patch** release. 198 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 点击爱心 6 | 7 | 19 | 20 | 21 | 22 | 23 |
          24 | 25 | 26 |
          27 | 28 | 29 | 30 | 31 | 268 | 269 | 270 | -------------------------------------------------------------------------------- /demo/js爱心.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 表白 6 | 7 | 19 | 20 | 21 | 22 | 23 |
          24 | 25 | 26 |
          27 | 28 | 29 | 30 | 31 | 268 | 269 | 270 | -------------------------------------------------------------------------------- /web前端最全笔记/biji_files/rainbow.min.js.下载: -------------------------------------------------------------------------------- 1 | window.Rainbow=function(){function t(t){var e,n=t.getAttribute&&t.getAttribute("data-language")||0;if(!n)for(t=t.attributes,e=0;e=t&&e>=d[w][n])&&(delete d[w][n],delete l[w][n]),t>=n&&tn&&e'+e+""}function r(t,e,i,c){if("undefined"==typeof t||null===t)c();else{var g=t.exec(i);if(g){++b,!e.name&&"string"==typeof e.matches[0]&&(e.name=e.matches[0],delete e.matches[0]);var m=g[0],u=g.index,f=g[0].length+u,h=function(){function n(){r(t,e,i,c)}b%100>0?n():setTimeout(n,0)};if(n(u,f))h();else{var y=s(e.matches),v=function(t,n,r){if(t>=n.length)r(m);else{var s=g[n[t]];if(s){var i=e.matches[n[t]],c=i.language,u=i.name&&i.matches?i.matches:i,l=function(e,s,o){var i;i=0;var p;for(p=1;p0?s():setTimeout(s,0)}else r(t)}var a=s(l[w]);n(t,a,0,e)}function p(t,e,n){var a=f[e]||[],r=f[y]||[],e=h[e]?a:a.concat(r);o(t.replace(//g,">").replace(/&(?![\w\#]+;)/g,"&"),e,n)}function c(t,n,a){if(n 第01阶段.前端基础.HTML常用标签 6 | ## 学习目标 7 | 8 | - 理解: 9 | - 相对路径三种形式 10 | - 应用 11 | - 排版标签 12 | - 文本格式化标签 13 | - 图像标签 14 | - 链接 15 | - 相对路径,绝对路径的使用 16 | 17 | # 1. HTML常用标签 18 | 19 | 首先 HTML和CSS是两种完全不同的语言,我们学的是结构,就只写HTML标签,认识标签就可以了。 不会再给结构标签指定样式了。 20 | 21 | HTML标签有很多,这里我们学习最为常用的,后面有些较少用的,我们可以查下手册就可以了。 22 | 23 | ## 1.1 排版标签 24 | 25 | 排版标签主要和css搭配使用,显示网页结构的标签,是网页布局最常用的标签。 26 | 27 | ### 1)标题标签h (熟记) 28 | 29 | 单词缩写: head 头部. 标题 title 文档标题 30 | 31 | 为了使网页更具有语义化,我们经常会在页面中用到标题标签,HTML提供了6个等级的标题,即 32 | 33 | **标题标签语义:** 作为标题使用,并且依据重要性递减 34 | 35 | 其基本语法格式如下: 36 | 37 | ```html 38 |

          标题文本

          39 |

          标题文本

          40 |

          标题文本

          41 |

          标题文本

          42 |
          标题文本
          43 |
          标题文本
          44 | ``` 45 | 46 | 显示效果如下: 47 | 48 | 49 | 50 | **小结 :** 51 | 52 | - 加了标题的文字会变的加粗,字号也会依次变大 53 | - 一行是只能放一个标题的 54 | 55 | ``` 56 | 传智播客学前端, 57 |    前端入门亦简单。 58 |    简单知识简单看, 59 |    重点勤练写三遍。 60 |    标题一共六级选, 61 |    具体效果刷新见。 62 |    ------pink老师 63 | ``` 64 | 65 | ### 2)段落标签p ( 熟记) 66 | 67 | 单词缩写: paragraph 段落 [ˈpærəgræf] 无须记这个单词 68 | 69 | **作用语义:** 70 | 71 | 可以把 HTML 文档分割为若干段落 72 | 73 | 在网页中要把文字有条理地显示出来,离不开段落标签,就如同我们平常写文章一样,整个网页也可以分为若干个段落,而段落的标签就是 74 | 75 | ```html 76 |

          文本内容

          77 | ``` 78 | 79 | 是HTML文档中最常见的标签,默认情况下,文本在一个段落中会根据浏览器窗口的大小自动换行。 80 | 81 | ### 3)水平线标签hr(认识) 82 | 83 | 单词缩写: horizontal 横线 [ˌhɔrəˈzɑntl] 同上 84 | 85 | 在网页中常常看到一些水平线将段落与段落之间隔开,使得文档结构清晰,层次分明。这些水平线可以通过插入图片实现,也可以简单地通过标签来完成,
          就是创建横跨网页水平线的标签。其基本语法格式如下: 86 | 87 | ```html 88 |
          是单标签 89 | ``` 90 | 91 | 在网页中显示默认样式的水平线。 92 | 93 | 课堂练习:新闻页面 94 | 95 | 96 | 97 | ### 4)换行标签br (熟记) 98 | 99 | 单词缩写: break 打断 ,换行 100 | 101 | 在HTML中,一个段落中的文字会从左到右依次排列,直到浏览器窗口的右端,然后自动换行。如果希望某段文本强制换行显示,就需要使用换行标签 102 | 103 | ```html 104 |
          105 | ``` 106 | 107 | 这时如果还像在word中直接敲回车键换行就不起作用了。 108 | 109 | 此处有练习题 110 | 111 | ### 5)div 和 span标签(重点) 112 | 113 | div span 是没有语义的 是我们网页布局主要的2个盒子 想必你听过 css+div 114 | 115 | div 就是 division 的缩写 分割, 分区的意思 其实有很多div 来组合网页。 116 | 117 | span 跨度,跨距;范围 118 | 119 | 语法格式: 120 | 121 | ```html 122 |
          这是头部
          今日价格 123 | ``` 124 | 125 | 他们两个都是盒子,用来装我们网页元素的, 只不过他们有区别,现在我们主要记住使用方法和特点就好了 126 | 127 | * div标签 用来布局的,但是现在一行只能放一个div 128 | * span标签 用来布局的,一行上可以放好多个span 129 | 130 | 后面后面讲显示模式的时候,会告诉大家 131 | 132 | ### 排版标签总结 133 | 134 | | 标签名 | 定义 | 说明 | 135 | | ------------- | :--------- | :------------------------------------ | 136 | | | 标题标签 | 作为标题使用,并且依据重要性递减 | 137 | |

          | 段落标签 | 可以把 HTML 文档分割为若干段落 | 138 | |
          | 水平线标签 | 没啥可说的,就是一条线 | 139 | |
          | 换行标签 | | 140 | |
          | div标签 | 用来布局的,但是现在一行只能放一个div | 141 | | | span标签 | 用来布局的,一行上可以放好多个span | 142 | 143 | ## 1.2 文本格式化标签(熟记) 144 | 145 | 在网页中,有时需要为文字设置粗体、斜体或下划线效果,这时就需要用到HTML中的文本格式化标签,使文字以特殊的方式显示。 146 | 147 | 148 | 149 | **区别:** 150 | 151 | b 只是加粗 strong 除了可以加粗还有 强调的意思, 语义更强烈。 152 | 153 | 剩下的同理... 154 | 155 | > 请同学们重点记住 前两组 加粗 和 倾斜 后面两组没记住回来查 156 | 157 | 158 | 159 | ## 1.3 标签属性 160 | 161 | 162 | 163 | 所谓属性就是**外在特性** 比如 手机的颜色 手机的尺寸 ,总结就是手机的。。 164 | 165 | - 手机的颜色是黑色 166 | - 手机的尺寸是 8寸 167 | - 水平线的长度是 200 168 | - 图片的宽度 是 300 169 | 170 | 使用HTML制作网页时,如果想让HTML标签提供更多的信息,可以使用HTML标签的属性加以设置。其基本语法格式如下: 171 | 172 | ```html 173 | <标签名 属性1="属性值1" 属性2="属性值2" …> 内容 174 | <手机 颜色="红色" 大小="5寸"> 175 | ``` 176 | 177 | 178 | 179 | ## 1.4 图像标签img (重点) 180 | 181 | 单词缩写: image 图像 182 | 183 | 要想在网页中显示图像就需要使用图像标签,接下来将详细介绍图像标签以及和他相关的属性。(它是一个单身狗) 184 | 185 | 语法如下: 186 | 187 | ```html 188 | 189 | ``` 190 | 191 | 该语法中src属性用于指定图像文件的路径和文件名,他是img标签的必需属性。 192 | 193 | 194 | 195 | border 后面我们会用css来做,这里童鞋们就记住这个border 单词就好了 196 | 197 | **注意: ** 198 | 199 | 1. 标签可以拥有多个属性,必须写在开始标签中,位于标签名后面。 200 | 2. 属性之间不分先后顺序,标签名与属性、属性与属性之间均以空格分开。 201 | 4. 采取 键值对 的格式 key="value" 的格式 202 | 203 | 比如: 204 | 205 | ```html 206 | 正常的
          207 |
          208 | 带有边框的
          209 |
          210 | 有提示文本的
          211 |
          212 | 有替换文本的
          213 | 图片不存在 214 | ``` 215 | 216 | 此处有练习题 217 | 218 | **重点掌握点:** 219 | 220 | - [ ] 请说出 图像标签那个属性是必须要写的? 221 | - [ ] 请说出 图像标签中 alt 和 title 属性区别? 222 | 223 | ## 1.5 链接标签(重点) 224 | 225 | 单词缩写: anchor 的缩写 [ˈæŋkə(r)] 。基本解释 锚, 铁锚 的 226 | 227 | 在HTML中创建超链接非常简单,只需用标签把文字包括起来就好。 228 | 229 | 语法格式: 230 | 231 | ```html 232 | 文本或图像 233 | ``` 234 | 235 | | 属性 | 作用 | 236 | | ------ | :----------------------------------------------------------- | 237 | | href | 用于指定链接目标的url地址,(必须属性)当为标签应用href属性时,它就具有了超链接的功能 | 238 | | target | 用于指定链接页面的打开方式,其取值有_self和_blank两种,其中_self为默认值,__blank为在新窗口中打开方式。 | 239 | 240 | **注意:** 241 | 242 | 1. 外部链接 需要添加 http:// www.baidu.com 243 | 2. 内部链接 直接链接内部页面名称即可 比如 < a href="index.html"> 首页 244 | 3. 如果当时没有确定链接目标时,通常将链接标签的href属性值定义为“#”(即href="#"),表示该链接暂时为一个空链接。 245 | 4. 不仅可以创建文本超链接,在网页中各种网页元素,如图像、表格、音频、视频等都可以添加超链接。 246 | 247 | **重点掌握点:** 248 | 249 | - [ ] 请说出 链接标签那个属性是必须要写的? 250 | - [ ] 请说出 如何新窗口打开这个一个链接网页的? 251 | 252 | 253 | 254 | ## 1.6 注释标签 255 | 256 | 在HTML中还有一种特殊的标签——注释标签。如果需要在HTML文档中添加一些便于阅读和理解但又不需要显示在页面中的注释文字,就需要使用注释标签。 257 | 258 | 简单解释: 259 | 260 | 注释内容不会显示在浏览器窗口中,但是作为HTML文档内容的一部分,也会被下载到用户的计算机上,查看源代码时就可以看到。 261 | 262 | 语法格式: 263 | 264 | ```html 265 | 快捷键是: ctrl + / 或者 ctrl +shift + / 266 | ``` 267 | 268 | 269 | 270 | 注释重要性: 271 | 272 | 273 | 274 | **pink老师 一句话说出他们:** 275 | 276 | > 注释是给人看的,目的是为了更好的解释这部分代码是干啥的, 程序是不执行这个代码的 277 | 278 | ### 团队约定 279 | 280 | 一般用于简单的描述,如某些状态描述、属性描述等 281 | 282 | 注释内容前后各一个空格字符,注释位于要注释代码的上面,单独占一行 283 | 284 | *推荐:* 285 | 286 | ``` 287 | 288 |
          ...
          289 | ``` 290 | 291 | *不推荐:* 292 | 293 | ``` 294 |
          ...
          295 | 296 |
          297 | ... 298 |
          299 | ``` 300 | 301 | # 2. 路径(重点、难点) 302 | 303 | 304 | 305 | 306 | 307 | 实际工作中,我们的文件不能随便乱放,否则用起来很难快速的找到他们,因此我们需要一个文件夹来管理他们。 308 | 309 | **目录文件夹: ** 310 | 311 | 就是普通文件夹,里面只不过存放了我们做页面所需要的 相关素材,比如 html文件, 图片 等等。 312 | 313 | 314 | 315 | **根目录 ** 316 | 317 | 打开目录文件夹的第一层 就是 根目录 318 | 319 | 320 | 321 | 页面中的图片会非常多, 通常我们再新建一个文件夹专门用于存放图像文件(images),这时再插入图像,就需要采用“路径”的方式来指定图像文件的位置。路径可以分为: 相对路径和绝对路径 322 | 323 | ## 相对路径 324 | 325 | 以引用文件之网页所在位置为参考基础,而建立出的目录路径。因此,当保存于不同目录的网页引用同一个文件时,所使用的路径将不相同,故称之为相对路径。 326 | 327 | 328 | 329 | | 路径分类 | 符号 | 说明 | 330 | | ---------- | :---: | :----------------------------------------------------------- | 331 | | 同一级路径 | | 只需输入图像文件的名称即可,如<img src="baidu.gif" />。 | 332 | | 下一级路径 | “/” | 图像文件位于HTML文件同级文件夹下(例如文件夹名称为:images) 如<img src="images/baidu.gif" />。 | 333 | | 上一级路径 | “../” | 在文件名之前加入“../” ,如果是上两级,则需要使用 “../ ../”,以此类推, 如<img src="../baidu.gif" />。 | 334 | 335 | **pink老师 一句话说出他们: ** 336 | 337 | > 相对路径,是从代码所在的这个文件出发, 去寻找我们的目标文件的,而 我们所说的 上一级 下一级 同一级 简单说,就是 图片 位于 HTML 页面的位置 338 | 339 | ## 绝对路径 340 | 341 | 绝对路径以Web站点根目录为参考基础的目录路径。之所以称为绝对,意指当所有网页引用同一个文件时,所使用的路径都是一样的。 342 | 343 | “D:\web\img\logo.gif”,或完整的网络地址,例如“http://www.itcast.cn/images/logo.gif”。 344 | 345 | **注意:** 346 | 347 | 绝对路径用的较少,我们理解下就可以了。 但是要注意,它的写法 特别是符号 \ 并不是 相对路径的 / 348 | 349 | # 3. 今日总结 350 | 351 | 每一天都有一个主题 我们HTML第一天的主题就是 <认识标签> 能用常用标签,写出最简单的页面 352 | 353 | 学HTML 之前 觉得 很神秘 354 | 355 | 356 | 357 | 等你学完之后忽然发现 358 | 359 | 360 | 361 | 362 | 363 | 总结今天的思路贯穿线: 364 | 365 | 366 | 367 | 368 | 369 | # 4. 综合案例: 圣诞 370 | 371 | 372 | 373 | # 5. @拓展阅读 374 | 375 | #### 5.1 锚点定位 (难点) 376 | 377 | 通过创建锚点链接,用户能够快速定位到目标内容。 378 | 379 | 创建锚点链接分为两步: 380 | 381 | ```html 382 | 1. 使用相应的id名标注跳转目标的位置。 (找目标) 383 |

          第2集

          384 | 385 | 2. 使用链接文本创建链接文本(被点击的) (拉关系) 我也有一个姓毕的姥爷.. 386 | 387 | ``` 388 | 389 | 390 | 391 | 快速记忆法: 392 | 393 | 好比找个人办事, 首先找到他,然后拉关系,最后看效果。 394 | 395 | #### 5.2 base 标签 396 | 397 | **语法:** 398 | 399 | ```html 400 | 401 | ``` 402 | 403 | 404 | 405 | **总结: ** 406 | 407 | 1. base 可以设置整体链接的打开状态 408 | 2. base 写到 之间 409 | 3. 把所有的连接 都默认添加 target="_blank" 410 | 411 | **pink老师 一句话说出他们:** 412 | 413 | > 全体链接~ 到 ~ 全体集合 所有链接 以新窗口打开页面 ~ 是 414 | 415 | #### 5.3 预格式化文本pre标签 416 | 417 |
           标签可定义预格式化的文本。
          418 | 
          419 | 被包围在 
           标签 元素中的文本通常会保留空格和换行符。而文本也会呈现为等宽字体。
          420 | 
          421 | ```html
          422 | 
          423 | 
          424 |   此例演示如何使用 pre 标签
          425 | 
          426 |   对空行和 空格
          427 | 
          428 |   进行控制
          429 | 
          430 | 
          431 | ``` 432 | 433 | **pink老师 一句话说出他们:** 434 | 435 | > 所谓的预格式化文本就是 ,按照我们预先写好的文字格式来显示页面, 保留空格和换行等。 436 | 437 | 有了这个标签,里面的文字,会按照我们书写的模式显示,不需要段落和换行标签了。但是,比较少用,因为不好整体控制。 438 | 439 | 440 | 441 | #### 5.4 特殊字符 (理解) 442 | 443 | 一些特殊的符号,我们再html 里面很难或者 不方便直接 使用, 我们此时可以使用下面的替代代码。 444 | 445 | 446 | 447 | **虽然有很多,但是我们平时用的比较较少, 大家重点记住 空格 大于号 小于号 就可以了,剩下的回来查阅。** 448 | 449 | **总结:** 450 | 451 | 1. 是以**运算符**`&`开头,以**分号运算符**`;`结尾。 452 | 2. 他们不是标签,而是符号。 453 | 3. HTML 中不能使用小于号 “<” 和大于号 “>”特殊字符,浏览器会将它们作为标签解析,若要正确显示,在 HTML 源代码中使用字符实体 454 | 455 | **团队约定** 456 | 457 | *推荐:* 458 | 459 | ``` 460 |
          more >> 461 | ``` 462 | 463 | *不推荐:* 464 | 465 | ``` 466 | more >> 467 | ``` 468 | 469 | 470 | #### 5.5 html5发展之路 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | #### 5.6 什么是XHTML 479 | 480 | XHTML 是更严格更纯净的 HTML 代码。 481 | 482 | - XHTML 指**可扩展超文本标签语言**(EXtensible HyperText Markup Language)。 483 | - XHTML 的目标是取代 HTML。 484 | - XHTML 与 HTML 4.01 几乎是相同的。 485 | - XHTML 是更严格更纯净的 HTML 版本。 486 | - XHTML 是作为一种 XML 应用被重新定义的 HTML。 487 | - XHTML 是一个 W3C 标准。 488 | 489 | #### 5.7 HTML和 XHTML之间有什么区别? 490 | 491 | - XHTML 指的是可扩展超文本标记语言 492 | - XHTML 与 HTML 4.01 几乎是相同的 493 | - XHTML 是更严格更纯净的 HTML 版本 494 | - XHTML 是以 XML 应用的方式定义的 HTML 495 | - XHTML 是 2001 年 1 月发布的 W3C 推荐标准 496 | - XHTML 得到所有主流浏览器的支持 497 | - XHTML 元素是以 XML 格式编写的 HTML 元素。XHTML是严格版本的HTML,例如它要求标签必须小写,标签必须被正确关闭,标签顺序必须正确排列,对于属性都必须使用双引号等。 498 | 499 | # 6. @深入阅读 500 | 501 | [HTML5的崛起之路](http://www.chinaz.com/manage/2015/0720/424831.shtml) 502 | 503 | # 7. 预习内容 504 | 505 | - 表格标签 506 | 507 | - 能够通过表格标签能够写出一个简版表格数据展示 508 | 509 | 例如: 510 | 511 | 512 | 513 | 可以把你今天学习的内容放在表格内,再次作为总结 514 | 515 | ​ -------------------------------------------------------------------------------- /web前端最全笔记/biji_files/z_stat.php: -------------------------------------------------------------------------------- 1 | (function(){function p(){this.c="1253473928";this.ca="z";this.Y="";this.V="";this.X="";this.D="1555073346";this.$="z10.cnzz.com";this.W="";this.H="CNZZDATA"+this.c;this.G="_CNZZDbridge_"+this.c;this.O="_cnzz_CV"+this.c;this.P="CZ_UUID"+this.c;this.K="UM_distinctid";this.A="0";this.J={};this.a={};this.Ca()}function h(a, 2 | b){try{var c=[];c.push("siteid=1253473928");c.push("name="+g(a.name));c.push("msg="+g(a.message));c.push("r="+g(l.referrer));c.push("page="+g(e.location.href));c.push("agent="+g(e.navigator.userAgent));c.push("ex="+g(b));c.push("rnd="+Math.floor(2147483648*Math.random()));(new Image).src="http://jserr.cnzz.com/log.php?"+c.join("&")}catch(d){}return!0}var q=function(){for(var a=document.getElementsByTagName("script"),b=0,c=a.length;bthis.a.b[b].h&&delete this.a.b[b];this.I()}catch(c){h(c, 9 | "cCV failed")}},I:function(){try{var a=[],b;for(b in this.a.b){var c=[];c.push(b);c.push(this.a.b[b].da);c.push(this.a.b[b].h);var d=c.join("|");a.push(d)}if(0===a.length)return!0;var f=new Date;f.setTime(f.getTime()+157248E5);var k=this.O+"=";this.b=g(a.join("&"));k+=this.b;k+="; expires="+f.toUTCString();l.cookie=k+"; path=/"}catch(n){h(n,"sCV failed")}},sa:function(){try{return this.N=e.location.href}catch(a){h(a,"gCP failed")}},o:function(){try{return this.a.Ha=l.referrer||""}catch(a){h(a,"gR failed")}}, 10 | ua:function(){try{return this.a.B=e.navigator.systemLanguage||e.navigator.language,this.a.B=this.a.B.toLowerCase(),this.a.B}catch(a){h(a,"gL failed")}},xa:function(){try{return this.a.ba=e.screen.width&&e.screen.height?e.screen.width+"x"+e.screen.height:"0x0",this.a.ba}catch(a){h(a,"gS failed")}},w:function(){try{return this.a.Da=this.i("ntime")||"none"}catch(a){h(a,"gLVST failed")}},T:function(){try{return this.a.ea=this.i("ltime")||(new Date).getTime()}catch(a){h(a,"gFVBT failed")}},wa:function(){try{var a= 11 | this.i("cnzz_a");if(null===a)a=0;else{var b=1E3*this.w(),c=new Date;c.setTime(b);(new Date).getDate()===c.getDate()?a++:a=0}return this.a.La=a}catch(d){h(d,"gRT failed")}},va:function(){try{return this.a.C=this.i("rtime"),null===this.a.C&&(this.a.C=0),0b;b++)if(-1 53 | 54 | css: /* */ 55 | 56 | js: /* */ 多行 //单行 57 | 58 | ## js 的几种输出方式: 59 | 60 | 1.alert: 弹出警示框 61 | 2.console.log("") 控制面板!!!! 62 | 3.document.write("1234"); 文档打印!!! 63 | 4.prompt("请输入",123); 弹出输入框 参数 1:提示信息 参数 2: 默认值 64 | 65 | ## 变量: 66 | 67 | var num = 10; 68 | 声明一个变量名叫 num 值是 10; 69 | 70 | ### 注意: 71 | 72 | 1.即声明又给值 结果是当前的值 73 | 2.只声明不给值:undefined 74 | 3,没有声明直接给值 浏览器自动加上 75 | 4.既没有声明又没有给值 结果报错; 76 | 5.一个变量只能存储一个值!! 77 | 78 | ### 声明变量的几种方式: 79 | 80 | 1.var num = 10; var num1 = 20; 81 | 2.var num=10,num1=20; 82 | 3.var num,num1; 83 | num=10; 84 | num=20; 85 | 86 | ### 变量的命名规则: 87 | 88 | 1.由数字 字母 下划线 \$符号 组成 89 | 2.不能以数 字开头 90 | 3.不能使用 关键字 保留字 91 | 4.见名知意 92 | 5 遵循驼峰命名法 uName userSchool 93 | 6.变量名不能超过 255 个字符; 94 | 95 | ## js 的数据类型: 96 | 97 | ### 1.基本数据类型 98 | 99 | 1.数值型(十进制) 100 | 101 | 0-所有的自然数 小数 负数 NaN:不是一个数字 102 | 103 | 2.字符串 104 | 105 | 只要加引号都属于字符串 特殊字符 只适用于 console.log() \n 换行 "un'de'fined" 'und"ef"ined' 106 | str.length: 访问字符串的长度 107 | str[索引|下标] 访问对应的每一个字符 索引从 0 开始 108 | 只要与字符串相加 就会相连!!! 109 | 110 | 3.布尔型 111 | 112 | true|false 113 | 如果参与运算: true=1 false=0 114 | 115 | 4.undefined: 116 | 117 | 只声明没给值 118 | 119 | 5.null(对象): 120 | 121 | 一般清空内存; 122 | 123 | typeof 检测数据类型 124 | 125 | isNaN判断是否是数字 如果是数字返回false 不是数字返回true 126 | "isNaN会默认尝试把内容转换成数字"!! 127 | 128 | ### 1.转换为字符型: 129 | 130 | 强制类型转化: 131 | 132 | num.toString() 133 | String(num) 134 | 135 | 隐式类型转换: 136 | 137 | 10+"" 138 | 139 | ### 2.转换为数值类型: 140 | 141 | 强制类型转化: 142 | 143 | parseInt(): 1.取整。 144 | parseFloat(); 1.保留小数; 145 | Number() 1.取整--保留小数 146 | 147 | 三者的区别: 148 | 149 | parseInt 150 | 结果是整数 字母在前 NaN 字母在后 干掉字母(保留整数)! 151 | parseFloat 152 | 结果是小数 字母在前 NaN 字母在后 干掉字母(保留小数)! 153 | Number 154 | 只要有字母结果 NaN 155 | 156 | 隐式类型转换: 157 | 158 | 1. 直接加 + 号 159 | 2. -0 /1 \*1 160 | 161 | ### 3.转换为布尔类型: 162 | 163 | 强制类型转换: 164 | 165 | Boolean() 166 | 167 | 隐式类型转换: 168 | 169 | !! 双重否定等于肯定 170 | 171 | 转换成 false 的情况: 172 | 173 | 0 undefined null NaN false "" 都是 false; 174 | 175 | # js 第二天: 176 | 177 | ## 算数运算符: 178 | 179 | + - \* / % 180 | 表达式: var num = 10; num+1 181 | 182 | ### 前++与后++: 183 | 184 | var a = 1; 185 | a++:先返回 在自加 186 | ++a:先自加 在返回 187 | 188 | 区别: 189 | 190 | 1).只有一个表达式的时候两者没有区别!! 191 | 2).当有多个表达式或者直接输出 要按照两者的语法规则. 192 | 193 | ## 比较运算符: > >= < <= == != === !== 194 | 195 | ==:只判断值是否相等 196 | ===:判断值与数据类型是否相等; 197 | 198 | ## 逻辑运算符: 199 | 200 | && || ! 201 | &&:一错全错; 202 | ||:一对全对 203 | !;取反 204 | ! > && >|| 205 | 206 | ### 短路运算: 207 | 208 | &&找错: 209 | 210 | 如果有错直接输出! 如果一个表达式没有错的返回 最后一个! 0 null false undefined NaN ""; 211 | 212 | ||找对: 213 | 214 | 如果有对直接输出! 如果一个表达式没有对的返回 最后一个! 215 | 216 | ## if..else.. 217 | 218 | 如果(){ 219 | 220 | }否则{ 221 | 222 | } 223 | 224 | ## 三元表达式: 225 | 226 | 10>5?alert(10):alert(5) 227 | 228 | ## switch: 229 | 230 | switch (参数){ 231 | case "匹配项“: 232 | 执行: 233 | break; 234 | } 235 | 236 | ### 注意事项: 237 | 238 | 1.case 后面不要加判断条件 239 | 2.case 匹配的全等(匹配值与数据类型) 240 | 3.每个 case 后面加 break; ###语法: 241 | 242 | # js 第三天: 243 | 244 | for(初始变量;循环的终止条件;循环的增量){ 245 | 执行的代码块 246 | } 247 | 248 | for 循环 与 while 循环 249 | 250 | for 循环一般用于知道循环次数; 251 | while 循环 不知道循环次数; 252 | 253 | while 与 do..while 区别: 254 | 255 | while:先判断在执行 256 | do..while:先执行在判断 257 | 258 | continue break 区别: 259 | 260 | continue:跳出当前循环 继续下一次循环 261 | break: 跳出整个循环 262 | 263 | # js 第四天: 264 | 265 | ## 什么是数组: 266 | 267 | 一组数据数据的集合 268 | 269 | ## 为什么使用数组: 270 | 271 | 方便对数据的统一管理 272 | 273 | var arr = ["张三","李四"]; 274 | var a = "张三"; 275 | var b = "李四"; ##数组的使用: 276 | 277 | ### 1.创建数组: 278 | 279 | 1.创建空数组 var arr = []; 280 | 2.创建空数组 var arr = new Array(); 281 | 3.创建有元素的数组 var arr = [1,2,3,4,5]; 282 | 4.创建有元素的数组 var arr = new Array(1,2,3,4,5); 283 | 284 | []与 new Array 区别: 285 | 286 | 当只有一个数据(数字) new Array 代表数组的长度 [] 代表一个数据 287 | 288 | ### 2.数组的使用: 289 | 290 | 1.获取元素: 291 | 292 | 1.下标(索引) 默认的索引从 0 开始 数组名[索引值] 当访问没有定义内容的数组 结果是 undefined 293 | 2.length 数组的长度 长度从 1 开始 294 | 295 | 2.数组里面嵌套数组:二维数组 296 | 297 | ### 3.数组的改变: 298 | 299 | 1.数组可以动态改变 300 | 2.清空数组 数组名.length = 0 数组名 = null 301 | var arr = [1,2,3] 302 | 303 | ### 4.数组可以存什么: 304 | 305 | 数组可以存储任意数据类型的元素 306 | 一般数组存储一种数据类型 307 | 308 | ### 5.数组的方法: 309 | 310 | push: 数组.push(元素) 向末尾添加元素 311 | pop: 数组.pop()删除数组末尾的元素 312 | unshift: 数组.unshift(元素) 数组的前面添加内容 313 | shift: 数组.shift()删除数组的第一个元素 314 | 315 | ### 什么是函数: 316 | 317 | 可重复使用的代码块 318 | 319 | ### 为什么使用函数: 320 | 321 | 1.减少代码量 322 | 2.使代码有模块化 323 | 324 | ### 函数的使用: 函数不调用自己不执行 325 | 326 | 定义函数: 327 | 328 | 1. function fn(){ 329 | 执行的代码块 330 | } 331 | 332 | fn 是函数名; 333 | 334 | 2. var fn = function(){ 335 | 执行的代码块 336 | } 337 | 338 | 函数的调用: 339 | 340 | 函数名(); 341 | 342 | ### 函数的参数: 343 | 344 | 形参:形式上的参数 定义函数时候的参数 本质是变量 345 | 实参:实际上的参数 调用函数时候的参数 本质是数据 346 | 347 | ### 参数个数的问题 348 | 349 | 1.当实参大于形参:多余的实参忽略不计 350 | 2.当形参大于实参: 多余的形参赋值给 undefined 351 | 352 | 总结:实参与形参要相匹配 353 | 354 | ### return:返回值 355 | 356 | 一个函数可以有返回值 也可以没有 357 | 358 | 1.如果只是单纯的打印(看到值) 可以不加 return 359 | 2.当用函数实现某种特定的功能 要加 return 360 | 3.当遇见 return 直接退出函数体 下面不在执行 361 | 4.一个函数只有一个 return 362 | 5.不加 return 默认返回 undefined 363 | 364 | # js 第五天: 365 | 366 | ## arguments(伪数组) 367 | 368 | 伪数组:具有数据的一些属性 但是也不具有数组的一方法 369 | 370 | arguments:实参的对象 只要创建函数默认就有 arguments 371 | 372 | 一般 形参多少 实参多少 373 | 374 | arguments 用的不多!!! 375 | 376 | ## 函数以参数的形式传递----回调函数 377 | 378 | ## 作用域: 379 | 380 | 全局作用域: 381 | 382 | 在函数外部都是全部作用域 383 | 384 | 局部作用域: 385 | 386 | 在函数内部都是局部作用域 387 | 388 | 全局变量: 389 | 390 | 在任何地方都可以访问 391 | 392 | 局部变量: 393 | 394 | 只能在当前作用域下访问 395 | 396 | 总结 397 | 398 | 局部可以访问全局 全局不可以访问局部 399 | 400 | ### 作用域链的基本原理: 401 | 402 | 当调用函数---会把函数推送到执行栈(局部作用域)----全局作用域与函数的链式称为作用域链。 403 | 404 | 0 级作用域链----1 级作用域链 405 | 406 | ## 预解析: 407 | 408 | 当浏览器加载的时候 会有提前预解析的过程; 409 | 410 | 提升: var num = 10; var num; 411 | 提升: function fn(){} function fn(){} 412 | 413 | 注意: 414 | 415 | 1.在函数内部 变量名与形参重名以形参为主!! 416 | 2.函数内部不加 var 关键字是全部变量(不能与形参重名) 417 | 3.函数定义当前作用域 与函数调用没有关系(不会改变当前函数的作用域) 418 | 419 | ## 对象: 万物皆对象!!!! 420 | 421 | ### 1.键值对的集合。 422 | 423 | ### 2.功能集与数据集的集合 424 | 425 | 数据集的描述: 属性:属性值 426 | 功能集的描述: 函数名:函数 427 | 428 | ### 3.普通函数与对象的函数: 429 | 430 | 对象的函数前面加对象 431 | 432 | ### 4,对象的获取: 433 | 434 | 对象.属性名 435 | 对象["属性名"] 436 | obj.方法() 437 | 438 | ### 对象的几种创建方式: 439 | 440 | 1.创建空对象: 在动态添加值 441 | 442 | var obj = {}; 443 | obj.name = "kf"; 444 | obj.age = 18; 445 | obj.sex = "nan"; 446 | 447 | 2.创建有内容的对象 448 | 449 | var obj = { 450 | name:"kf", 451 | age:"18", 452 | sex:"nan" 453 | } 454 | 455 | 3.创建空对象: 456 | 457 | var obj = new Object(); 458 | obj.name = "kf"; 459 | obj.age = 18 460 | 461 | 4.创建有内容的对象: 462 | 463 | var obj = new Object({ 464 | name:"kf", 465 | age:18 466 | }) 467 | 468 | ### 对象的封装: 469 | 470 | 工厂模式: 471 | 472 | function person(name, age, sex) { 473 | //var obj = {}; 474 | var obj = new Object() 475 | obj.name = name; 476 | obj.age = age; 477 | obj.sex = sex; 478 | return obj; 479 | } 480 | 481 | 构造函数: 482 | 483 | function Person(name,age,sex){ 484 | this.name = name; 485 | this.age = age; 486 | this.sex = sex 487 | } 488 | var per = new Person("tongtong",30,"男") 489 | var per = person("jujie",50,"男"); 490 | 491 | ### new 的执行过程: 492 | 493 | 1.创建空对象(创建内存地址) 494 | 2.改变 this 指向当前对象 495 | 3.执行构造函数的代码 496 | 4.返回 this; 497 | 498 | 面向过程: 499 | 500 | 举行晚会: 1.找演员--->2.找吃的--->3.灯光摄影--->4.抽奖活动 501 | 502 | 面向对象: 503 | 504 | 举行晚会: 1.找演员--->2.找吃的--->3.灯光摄影--->4.抽奖活动 505 | 506 | # js 第六天: 507 | 508 | ## 数学对象: 509 | 510 | 1.Math.PI 511 | 2.Math.max(1,3,4) 512 | 3.Math.min() 513 | 4.random() 514 | 5.floor() 515 | 6.ceil 516 | 517 | ## 日期对象: 518 | 519 | ### 构造函数: 520 | 521 | 1.var date = new Date(); 522 | 2.可以添加参数获取的是参数对应的日期 523 | 3.不添加参数 获取的是当前日期 524 | 525 | ### 方法: 526 | 527 | 1.获取年: getFullYear() 528 | 2.获取月: getMonth() 获取月要加1 529 | 3.获取日期:getDate() 530 | 4.获取星期:getDay 星期日是0 531 | 5.获取时: getHours() 532 | 6.获取分:getMinutes(); 533 | 7.获取秒:getSeconds(); 534 | 535 | ### 获取毫秒值: 536 | 537 | 获取的距离 1970 年 1 月 1 日 538 | 539 | 1.获取的方式 540 | 541 | 1.date.valueOf() 542 | 2.date.getTime() 543 | 3.+new Date() 544 | 4.h5 新增 Date.now() 545 | 546 | 2.typeof 判断 547 | 548 | 基本数据类型 549 | 550 | 3.判断对象(数组) 551 | 552 | 1.instanceof arr instanceof Array; 553 | 2.Array.isArray(arr); 554 | 555 | 4.数组的方法: 556 | 557 | push: 数组.push(元素) 向末尾添加元素 558 | pop: 数组.pop()删除数组末尾的元素 559 | unshift: 数组.unshift(元素) 数组的前面添加内容 560 | shift: 数组.shift()删除数组的第一个元素 561 | reverse():翻转数组 562 | arr.sort(function (a, b) { 排序 563 | return a - b 升序 564 | return b - a 降序 565 | }) 566 | indexOf():查找元素 没有找到对应的元素 返回-1 找到返回对应的索引; 567 | join() 参数: 把数组以参数的形式分隔 如果不传默认是逗号分隔; 568 | concat:合并数组 569 | slice: 不修改原数组 截取 (开始索引,结束索引) 不包含结束索引 如果只传递一个参数 从当前参数截取到 最后。 570 | splice:修改原数组 截取 (开始索引,截取的长度,要替换的元素) 571 | 572 | ### 基本包装类型: 万物皆对象!!!! 573 | 574 | 基本数据类型 通过包装 转化成复杂数据类型; 575 | 576 | 1. 后台的调用 方便程序员使用一些属性和方法----基本包装类型 577 | 计算机默认: 578 | 创建对象 579 | var str = "hello"; 580 | var str1 = new String("hello"); 581 | 把变量给当前变量 582 | str = str1; 583 | 内存释放 销毁 584 | str1 = null 585 | 基本包装类型与复杂数据类型的区别: 586 | 1.都可以使用字符串的一些方法与属性 587 | 2.基本包装类型创建完之后立刻销毁。 588 | 589 | 1.字符串: 590 | 591 | 面试题: 如何优化代码的性能: 592 | 593 | 字符串的不可变; 用数组解决 594 | 595 | 字符串:重新开辟内存空间 原来的内容不会销毁 596 | 数组: 不会重新开辟内存空间 会把原来的覆盖。 597 | var str = ""; 598 | var arr = []; 599 | for (var i = 0; i < 100; i++) { 600 | arr.push(i) 601 | } 602 | console.log(arr.join("")); 603 | 604 | indexOf:查找元素 605 | 606 | indexOf("元素",开始查找的索引) 找到返回索引 找不到返回-1 607 | 608 | str.charAt(索引):查找对应的元素 609 | 610 | str[0] 查找对应的元素 611 | 612 | concat 拼接字符串 613 | 614 | toUpperCase:转化大写 615 | 616 | toLowerCase 转化小写 617 | 618 | substring(2,5) 字符串的截取 619 | 620 | split("-") 转化成数组 621 | 622 | ### 基本数据类型与复杂数据类型的存储方式: 623 | 624 | 基本数据类型存储在栈里面 本质是真是的数据; 625 | 复杂数据类型存储在对里面 对里面本质真是的数据 栈里面存的是地址; 626 | --------------------------------------------------------------------------------