本文介绍JavaScript面向对象编程中的创建对象和继承的实现,主要来自《JavaScript高级程序设计》。
git回滚
Git版本恢复命令,首先通过git log指令找出要恢复的版本,之后可以执行下面的两种操作
正则表达式
块级元素和内联元素
块级元素和内联元素的定义
Block-level elements are those elements of the source document that are formatted visually as blocks (e.g., paragraphs). The following values of the ‘display’ property make an element block-level: ‘block’, ‘list-item’, and ‘table’.
Inline-level elements are those elements of the source document that do not form new blocks of content; the content is distributed in lines (e.g., emphasized pieces of text within a paragraph, inline images, etc.). The following values of the ‘display’ property make an element inline-level: ‘inline’, ‘inline-table’, and ‘inline-block’. Inline-level elements generate inline-level boxes, which are boxes that participate in an inline formatting context.
inline-block空div和有内容的div显示不在一行的问题
当使用css实现div在同一行中显示时,可以使用将div的display属性设为inline-block的方式,但是使用这种方式设置会有一个问题,即空的div和有内容的div并不在同一条水平线上。如下面例子中第一行的div。
http://shly.github.io/shly/IFE/task_13/index.html
npm笔记(修改npm镜像站)
方法一 命令行输入npm config edit可以调出.npmrc文件(npm userconfig file)。通过修改里面的register可以修改npm镜像站点。
gulp API
将本地项目首次提交到远程git上遇到的问题
当初将一个项目托管到git上时,应首先在git上建立一个仓库,比如名为example,然后在本地项目的文件夹下执行下面的指令:
css3动画
ajax使用
AJAX = Asynchronous JavaScript and XML(异步的 JavaScript 和 XML)。