目标
- 用javascript实现一个与微信通讯录效果相似的插件
要求
- 易用
- 尽量遵守 weui 设计规范
- 最好是原生的,不依赖 jQuery
- 页面滚动要流畅
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<title>fixed problem</title> | |
<style> | |
.container { | |
position: relative; | |
} |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<title>absolute solution</title> | |
<style> | |
.container { | |
position: absolute; | |
display: flex; |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>format json</title> | |
<style> | |
textarea { | |
width: 100%; | |
min-height: 800px; | |
overflow-y: auto; |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>css variables && animations</title> | |
<script src="http://cdn.bootcss.com/jquery/2.2.4/jquery.js"></script> | |
<style> | |
:root { | |
--transparency: 1; | |
--v_offset: -100%; |
#!/usr/bin/env ruby | |
#生成 10_000 个范围在0-4之间的随机数 | |
#计算他们的平均值 | |
#从中随机抽取100个数 | |
#通过有放回重抽法尝试 10_000 次 | |
#每次抽 100 个数 | |
#计算这100个数的平均值 | |
#计算这 10_000 次的平均值 | |
#以上步骤尝试100次 | |
module Solution |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>partical</title> | |
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
} |
(function(global, undefined){ | |
function copyToClipboard(content, successCallback) { | |
successCallback = successCallback || alert.bind(this, '复制成功'); | |
// http://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript | |
// IE 8 | |
if(window.clipboardData) { | |
window.clipboardData.setData('Text', content); | |
e.preventDefault(); | |
} | |
// IE 9 以及现代浏览器 |
/** | |
* 司机星级 | |
* | |
* author: Jude.Zhu | |
* date: 2016-01-23 | |
* | |
* require icomoon font-family | |
* | |
* usage: | |
* |