
HTML5
文章平均质量分 87
每天都有进步
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
前端搭建CICD流程
用Docker-compose 安装gitlab、gitlab-runner原创 2023-01-30 17:08:25 · 503 阅读 · 0 评论 -
HTML实现TabBar布局
HTML实现TabBar布局原创 2020-08-24 16:00:29 · 2748 阅读 · 0 评论 -
JS原型链和继承图文理解
JS原型链概况JS的构造函数(即一普通的Function),可以理解为面向对象的一个Class, 这里就把Function都叫做Class吧。文字表现太生涩,没有图片理解形象。function Father() { this.info = ["Zero"]}图1-1这个图中要理解4个东西:1.函数 Fu2.prototype指针3.__proto__对象内部指针4.constructor 指针接下来对这四个东西、进行详细解释:1、函数首先如代码所示,申明了一个Father的原创 2020-08-06 15:56:48 · 978 阅读 · 0 评论 -
CSS Overflow:hidden
终于知道为什么要设置OverFlow:Hidden了, 看代码:div id="wrapper"> figure class="img-wrapper"> img src="https://d13yacurqjgara.cloudfront.net/users/43342/screenshots/1973147/studiojq2015_explore62_1x原创 2016-12-14 09:47:08 · 277 阅读 · 0 评论 -
构造函数模式
1.创建特定类型的对象2.js开发尽量用单引号 var AA = { /*构建者模式就是 构造对象自己*/ Constractor: function(huawen) { //先自己实例化对象 ,function中的函数指向的是function,不是外层字典。 if(!(this instance原创 2016-12-14 09:48:18 · 216 阅读 · 0 评论 -
单例模式
/*单例模式 就是方便 模块间的相互调用*/ // 外层函数只是为了自动执行,创建函数实例 var xw = (function xiaoWang() { //创建类方法 var sendMessage = function() { var infoClass = { setLian: function() { this原创 2016-12-14 09:48:13 · 126 阅读 · 0 评论 -
面向对象之类的封装与调用
(function() { function people(name) { this._name = name; } function student(name) { this._name = name; } //为原型对象添加say方法 people.prototype.say = function() {原创 2016-12-14 09:47:58 · 202 阅读 · 0 评论 -
正则表达式
1、正则表达式主要用于匹配字符串,拥有内置String对象的一些常用方法。但我觉得用正则表达式应该去匹配一些字符串的组合,如电话号码,邮箱等,当然查找和替换还是有用的,因为他可以全局替换嘛。这里附上两个学习网址:一个有帮助文档,如语法,另一个是正则分析工具:http://www1.w3cfuns.com/tools.php?mod=regexhttp://regexper.com/原创 2016-12-14 09:48:08 · 153 阅读 · 0 评论 -
CSS 3D旋转 hover 后设置transform 是相对于正常位置
Document .nav{ width: 980px; margin: 50px auto; background-color: #fdfdfd; border: 1px #ccc solid; } .nav:after{ clear: both; display: block; overflow: hidden; conten原创 2016-12-14 09:47:11 · 610 阅读 · 0 评论 -
立体透视 perspective transform-style 倾斜旋转
1.perspective 是设置镜头距离,距离越远视图越小,视图越近,视图越大。就像相机焦距一样。其只对子元素产生效果.2.transform-style: preserve-3d 设置3d效果,也是只对子元素产生效果。3. 倾斜的视图,并且旋转,最开始我以为要对坐标系统进行旋转,其实不然。设置联合动画就行。 @keyframes Rotate{ /*//联合作用才会产原创 2016-12-14 09:47:14 · 464 阅读 · 0 评论 -
JS学习第一课
1.js 按照编写顺序执行2.输出使用document.write.3.申明数组 var array = [1,2,3,5] ; var arrStr = ["sgsg","gset","etet"]; 或者 var myArray = new Array(); Array[1] = 10;4、清空变量时负值为null ; var i = 10 ; i = null;原创 2016-12-14 09:47:16 · 164 阅读 · 0 评论 -
JS函数
1、申明函数 function demo(a,b){}2、javaScript对大小写敏感,demoOver,首单词小写。3、函数通常小写命名。4、函数返回用return原创 2016-12-14 09:47:19 · 150 阅读 · 0 评论 -
异常捕获
1、代码 try{ 执行代码块}catch(err){//异常信息alert(err);//抛出异常if(err=='004')throw("密码错误");}原创 2016-12-14 09:47:21 · 150 阅读 · 0 评论 -
JS事件
1、onClick 、onMouseOver(经过)、onMouseOut 、 onChange(文本内容输入)、onSelect(文本框选中)、onFocus(光标选中),onBlur(光标移开),onLoad(网页加载事件)、onUnload (关闭网页事件)原创 2016-12-14 09:47:24 · 450 阅读 · 0 评论 -
dom对象操作Html,Css
HTML:1、不要再文档加载完使用document.write,这样会创建新的dom对象,原来的元素将被覆盖。2、获取元素,通过getElementbyID; getElementbyTag("p")(相同元素的第一个)3、改变属性.getElementbyID('id').href="www.baidu.com"; CSS:1. 语法document.getElement原创 2016-12-14 09:47:28 · 224 阅读 · 0 评论 -
级联函数
/*级联函数重点在于 把当前原型对象指针返回, 即可调用其他方法*/ function person() { this._lian = ""; this._zui = ""; this._tui = ""; } person.prototype = { setLian: function() { this._lian =原创 2016-12-14 09:48:06 · 829 阅读 · 0 评论 -
函数颗粒化 参数截取并传递
/*----函数颗粒化就是函数参数截取,并合并参数-----*/ // 在这个函数中进行add函数所需参数的截取,用到的函数slice,call,apply function curry(fn){ //截取第一个参数 var firstAgu = Array.prototype.slice.call(arguments,1);原创 2016-12-14 09:48:03 · 1072 阅读 · 0 评论 -
linux 搭建MongoDB 搭建Redis 搭建Node PM2
MongoDB数据库下载 传统Lengency版本:https://www.mongodb.com/download-center?jmp=nav#community1解压:tar -zxvf mongodb-linux-xxx.tgz 2移动到指定目录:mv mongodb-linux-xxx/ /opt/mongodb3设置环境变量vi /etc/profil...原创 2019-04-20 10:25:07 · 419 阅读 · 0 评论 -
CSS 面向对象注意事项
参考网站:OOCSS主要的两个原则2. 结构与皮肤相分离 age structure (width, height, margins, padding) from appearance (fonts, colors, animations)/* Structure */.side-widget { width:100%;原创 2017-03-15 16:28:35 · 267 阅读 · 0 评论 -
给伪类设置z-index= -1;
.column{ position: relative; float: left; padding: 30px 0; width: 25%; z-index: 0; background-color: orange; text-align: center;}.button:before,.button:after原创 2016-12-14 09:47:01 · 1047 阅读 · 0 评论 -
JS创建自定义对象
普通对象的创建:创建对象:1、people = new Object();people.name = "lin";people.age = "26“;2、创建字典对象 people = {name:"lin",age:"30"}; 3、通过set方法创建对象function people(name,age){this._name = name;thi原创 2016-12-14 09:47:33 · 165 阅读 · 0 评论 -
JS内置对象
字符串对象 //字符串对象 var str = "Hello worldlsgjlsjg"; document.write('string.length='+str.length); //查找索引 document.write("indexof 'wor'",+str.indexOf('wor')); //字原创 2016-12-14 09:47:36 · 146 阅读 · 0 评论 -
JS计时器
连续执行:1、 var timeInterval = setInterval(function(){},500); 2、清除计时: clearInterval(timeInterval);暂停执行1、 var tOut = setTimeOut(function(){},3000);2、 停止执行clearTimeout(tOut);原创 2016-12-14 09:47:43 · 138 阅读 · 0 评论 -
history对象
1、history对象前进history.forward()2、history对象后退history.back()3、history对象跳入指定页面history.go(-1); //当前页面为0,前进为1后退为-1,等等。原创 2016-12-14 09:47:46 · 156 阅读 · 0 评论 -
location对象
1.获取主机名、路径、端口、协议 var hostName = window.location.hostname; var pathName = window.location.pathname; var port = window.location.port; var protocal = window.location.protocol; docum原创 2016-12-14 09:47:48 · 177 阅读 · 0 评论 -
Screen对象
document.write("Screen-width:"+screen.width+"Screen-height:"+screen.height);document.write("Screen-width:"+screen.availWidth+"Screen-height:"+screen.availHeight);document.write("window-width:"+windo原创 2016-12-14 09:47:51 · 229 阅读 · 0 评论 -
面向对象之prototype,__proto__
var person = function(name) { this.name = name }; person.prototype.getName = function() { return this.name; } var zjh = new person('zhangjiahao'); zjh.getName(); //zhangj原创 2016-12-14 09:47:56 · 286 阅读 · 0 评论 -
惰性函数
//惰性函数,即对function对象进行更改,但第二次才会执行该函数。 function createXML(){ var xmlHttp; try{ //-------开始更改---- createXML = function(){ return xmlHttp = new XMLHttpRequest(); }原创 2016-12-14 09:48:01 · 151 阅读 · 0 评论 -
dom添加事件
1.语法:document.getElementById('btn').addEventListener2.可以添加多个EventListener,且不会覆盖3、移除EventListener, document.getElementById('btd').removeEventListener("click",functionName); 事件处理:1、级处理html直接添加原创 2016-12-14 09:47:31 · 237 阅读 · 0 评论 -
jQuery 菜单项切换
ul { list-style: none; padding: 0; margin: 0; } .menu li { background: gray; text-align: center; line-height: 30px; padding: 5px 10px; width: 50px;原创 2016-12-14 09:49:04 · 245 阅读 · 0 评论 -
jQueryUI之交互
.ui-selected { background: #004099; } //允许拖动 $(function() { //可拖动 $('#div1').draggable(); //可拖入 $('#div2').droppable(); $('#div2').on('drop', function原创 2016-12-14 09:49:09 · 170 阅读 · 0 评论 -
JS 代理模式
/*-------代理模式,A想执行C方法,A调用B间接执行*/ function peopleSing() { this.singSong = function() { var songName = new peopleManageSongs().getSongName(); alert("老子拿到歌了,你妈~~" + songName); }原创 2016-12-14 09:48:26 · 201 阅读 · 0 评论 -
编码规范
1.function 作为类时,首字母大写2.function 作为方法,第二个单词首字母大写。3.js最好用单引号。原创 2016-12-14 09:48:28 · 187 阅读 · 0 评论 -
rem ,em ,px的区别
参考网址:http://www.cnblogs.com/leejersey/p/3662612.html原创 2016-12-14 09:49:44 · 216 阅读 · 0 评论 -
移动混合开发之android文件管理-->flexbox,webFont。
增加操作栏,使用felxbox居中,felx相关参考网址:http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html使用webFont添加图标,webFont下载地址为http://fontello.com/index.html:<!-- Licensed to the Apache Software Foundatio原创 2016-12-14 09:49:41 · 183 阅读 · 0 评论 -
移动混合开发之android文件管理demo
框架采用cordova,android编译环境为android studio.系统为mac,cordova 环境搭建参考网址:http://cordova.apache.org/docs/en/5.0.0/cordova/plugins/pluginapis.html#Plugin%20APIs1.index.html<!-- Licensed to the Apache So原创 2016-12-14 09:49:39 · 258 阅读 · 0 评论 -
移动混合开发之页面布局
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding cop原创 2016-12-14 09:49:34 · 330 阅读 · 0 评论 -
移动混合开发之HTML5在移动开发中的准则
1.尽量单页面开发2.慎重选择前端UI框架,新手最好自己动手。3.动画特效达到60fps4.长度单位是用rem,即字体的宽度,字体宽度可根据 window.width/number.原创 2016-12-14 09:49:31 · 161 阅读 · 0 评论 -
移动混合模式开发
一个移动app需要原声和html集成框架如cordova。再者需要一个移动UI框架,就可以开发移动app.如下是一些国外常用的UI框架http://tutorialzine.com/2015/10/comparing-the-top-frameworks-for-building-hybrid-mobile-apps/原创 2016-12-14 09:49:29 · 262 阅读 · 0 评论 -
jQueryMobile控件之展开与合并
Title 我是Section标题 我是内容,你要咋个? 我是Section标题 我是内容,你要咋个?原创 2016-12-14 09:49:24 · 210 阅读 · 0 评论