注:以下所有例子均 只 在 iOS 的微信中测试过,但对于饿了么APP的内置浏览器同样适用(两者使用相同内核)
工作中常常有需要显示大量信息的情况,列表超出一屏就涉及到滚动的问题。例如
- var n = 1
<!-- 适应移动端start --> | |
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> | |
<meta name="apple-mobile-web-app-capable" content="yes" /><!-- 删除苹果默认的工具栏和菜单栏 --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /><!-- 设置苹果工具栏颜色 --> | |
<meta name="format-detection" content="telphone=no, email=no" /><!-- 忽略页面中的数字识别为电话,忽略email --> | |
<!-- 启用360浏览器的极速模式(webkit) --> | |
<meta name="renderer" content="webkit" /> | |
<!-- 避免IE使用兼容模式 --> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |
<!-- 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑莓 --> |
<!doctype html> | |
<meta charset="utf-8" /> | |
<style type="text/css"> | |
canvas { | |
display: block; | |
} | |
</style> | |
<input id="file" type="file" accept="image/*" multiple /> | |
<canvas id="canvas"></canvas> | |
<script> |
From 28e518f73665baa867e5a0627cffdad0ab4f09f0 Mon Sep 17 00:00:00 2001 | |
From: Carter Li <carter.li@eoitek.com> | |
Date: Wed, 6 Sep 2017 10:07:12 +0800 | |
Subject: [PATCH 1/3] Dynamic tls records | |
--- | |
src/event/ngx_event_openssl.c | 39 +++++++++++++++++ | |
src/event/ngx_event_openssl.h | 15 ++++++- | |
src/http/modules/ngx_http_ssl_module.c | 76 ++++++++++++++++++++++++++++++++++ | |
src/http/modules/ngx_http_ssl_module.h | 6 +++ |
function foo(req, res) { | |
req.log("hello from foo() handler"); | |
return "foo"; | |
} | |
function summary(req, res) { | |
var a, s, h; | |
s = "JS summary\n\n"; |
From c45dfdd8d0c3de53b4f56610292a72ecad321362 Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= <carter.li@eoitek.com> | |
Date: Fri, 15 Jun 2018 14:58:33 +0800 | |
Subject: [PATCH] add "proxy_ssl_alpn" directive | |
--- | |
src/event/ngx_event_openssl.c | 22 ++++++++++++++++++ | |
src/event/ngx_event_openssl.h | 2 ++ | |
src/http/modules/ngx_http_proxy_module.c | 29 ++++++++++++++++++++++++ | |
src/http/modules/ngx_http_ssl_module.c | 2 -- |
Animated counter is vary useful on dashboard, and implement it with javascript (requestAnimationFrame can be use for performance reasons) is not hard.
But what about a pure CSS solution? It can be done long ago using animation-timing-function: steps(X)
, but the code is verbose and supported range of numbers are very limited.'
With recently supported CSS.registerProperty and @property we could finally animate CSS variables.
@property --num {
if &shell =~# 'fish$' | |
set shell=sh | |
endif | |
set termguicolors | |
call plug#begin('~/.vim/plugged') | |
Plug 'tpope/vim-sensible' | |
Plug 'mhinz/vim-startify' | |
Plug 'lambdalisue/battery.vim' |
#include <liburing.h> | |
#include <libaio.h> | |
#include <unistd.h> | |
#include <sys/signalfd.h> | |
#include <sys/epoll.h> | |
#include <sys/poll.h> | |
#include <stdio.h> | |
int setup_signal() { | |
sigset_t mask; |