图片延迟加载,滚动加载
- 使用一个空白的srcgif图像
1 | <img src="blank.gif" class="lazy" data-src="/images/full-size.jpg" width="240" height="152"> |
1 | !function(window){ |
1 | <img src="blank.gif" class="lazy" data-src="/images/full-size.jpg" width="240" height="152"> |
1 | !function(window){ |
1 | javascript:void((function(d){if(self!=top||d.getElementById('toolbar')&&d.getElementById('toolbar').getAttribute('data-resizer'))return false;d.write('<!DOCTYPE HTML><html style="opacity:0;"><head><meta charset="utf-8"/></head><body><a data-viewport="240x240" data-icon="handy">Mobile</a><a data-viewport="320x480" data-icon="mobile">Mobile (e.g. Apple iPhone)</a><a data-viewport="320x568" data-icon="mobile" data-version="5">Apple iPhone 5</a><a data-viewport="600x800" data-icon="small-tablet">Small Tablet</a><a data-viewport="768x1024" data-icon="tablet">Tablet (e.g. Apple iPad 2-3rd, mini)</a><a data-viewport="1024x768" data-icon="display" data-version="17″">17″ Display</a><a data-viewport="1280x800" data-icon="notebook">Widescreen</a><a data-viewport="2560x1600" data-icon="display" data-version="30″">30″ Apple Cinema Display</a><script src="http://lab.maltewassermann.com/viewport-resizer/resizer.min.js"></script></body></html>')})(document)); |
1 | https://unsplash.it/200/300 |
1 | https://unsplash.it/200/300/?random |
1 | https://unsplash.it/list |
1 | https://unsplash.it/200/300/?blur |
file:///C:/Users/zhouhengyi/Desktop/unsplash-it-master/public/index.html
See the Pen javascript 数字动画、递增特效 by henry (@ZhouHengYi) on CodePen.
1 | <h2 class="images">0</h2> |
1 | var countToNumber = function (element, number, suffix, duration) { |
轻量级CSS 响应式框架
http://ibruce.info/2013/11/22/hexo-your-blog/
1 | $ hexo new "My New Post" |
More info: Writing
1 | $ hexo server |
More info: Server
1 | $ hexo generate |
More info: Generating
1 | $ hexo deploy |
More info: Deployment
1 | http://maroslaw.github.io/rainyday.js/dist/rainyday.0.1.2.min.js |
完美展示图片原尺寸
VirtualBox
下载:https://www.virtualbox.org/
Vagrant
下载:https://www.vagrantup.com/
安装Box1
vagrant box add hefeng centeros.box
切换至对应初始目录1
vagrant init hefeng
OK 的话当前-目录会生成Vagrantfile文件,并进行网络配置
启动1
vagrant up
登录的帐号密码均为 vagrant ,登录之后如果需要 su root ,密码也是 vagrant
注:使用 vagrant ssh 时,会提示可以使用密钥进行登录,如果需要使用putty进行密钥登录的话,需要下载 puttygen 将 ssh 的密钥转换为 ppk 文件才能使用。1
vagrant ssh
1 | Host: 127.0.0.1 |
下载SSH 工具(windows)
http://mobaxterm.mobatek.net/MobaXterm_v8.4.zip
链接时选择上方 Private key
设置端口转发
服务器:192.168.0.236 : 22
vagrant1:127.0.0.1(192.168.0.115) 2222
本机:127.0.0.1:8080