(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
.test1 { | |
text-align:justify; | |
text-justify:distribute-all-lines;/*ie6-8*/ | |
text-align-last:justify;/* ie9*/ | |
-moz-text-align-last:justify;/*ff*/ | |
-webkit-text-align-last:justify;/*chrome 20+*/ | |
} | |
@media screen and (-webkit-min-device-pixel-ratio:0){/* chrome*/ | |
.test1:after{ | |
content:"."; |
function sku() { | |
var result = []; | |
var arr = Array.prototype.slice.call(arguments); | |
(function fn(parameter, array, len) { | |
if (len == 0) return result.push(parameter); | |
for (var i = 0; i < array[len - 1].length; i++) { | |
fn(parameter.concat(array[len - 1][i]), array, len - 1); | |
} | |
})([], arr, arr.length); | |
return result; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
iOS 下原生内容滚动比较卡可以给容器添加下面 CSS 属性: | |
-webkit-overflow-scrolling: touch; |
// 保留两位数字符 | |
const twoDigits = (num) => ('0' + num).slice(-2); |
// Add percentage of white to a color | |
@function tint($color, $percent){ | |
@return mix(white, $color, $percent); | |
} | |
// Add percentage of black to a color | |
@function shade($color, $percent){ | |
@return mix(black, $color, $percent); | |
} |
img { | |
/* Same as first example */ | |
min-height: 50px; | |
} | |
img:before { | |
content: " "; | |
display: block; | |
position: absolute; |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<img src="base64:xxxxx" class="hack-qcode"/> | |
</body> | |
</html> |
function getArrForAlphabet(startLetter, endLetter) { | |
//var regExp = /^[a-zA-Z]$/gi; | |
var regExp = new RegExp("^[a-zA-Z]$"); | |
if (!regExp.test(startLetter) || !regExp.test(endLetter)) { | |
//console.log(regExp.test(startLetter)); | |
//console.log(regExp.test(endLetter)); | |
console.log('请传入字母!'); | |
return false; | |
}; | |
//i是得到开始字母的数字表示,j得到结束字母的数字表示 |
@mixin text-3d($color: white, $depth: 5) { | |
$shadows: (); | |
$shadow-color: $color; | |
@for $i from 1 through $depth { | |
$shadow-color: darken($shadow-color, 10%); | |
$shadows: append($shadows, 0 ($i * 1px) $shadow-color, comma); | |
} | |
color: $color; |