免费HTTPS证书生成
https://freessl.org/
抓包工具Charles Proxy License
// 适用于Charles任意版本的注册码。
// Charles 4.2目前是最新版,可用。
Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4
##阿里云存储oss,图片压缩,
<img class="brand-bigimg" :src="brandDetail.bgImg+'?x-oss-process=image/format,webp'" />
常用命令:
查看9000端口的使用情况
netstat -ant |grep 9000
结束进程:
sudo pkill -9 php-fpm
sudo pkill -9 php-cgi
重启fpm:
sudo /usr/sbin/php-fpm --daemonize
切换php版本:
/Applications/MAMP/Library/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -C 5 -f /Applications/MAMP/bin/php/php5.2.17/bin/php-cgi
开启权限:
chmod -R 777 *
进度条:
<div class="bg_con">
<input id="checked_1" type="checkbox" class="switch" />
<label for="checked_1"></label>
</div>
backbackground: -webkit-linear-gradient(left,#7bc7fd,#0094ff);
进度条的颜色变化《线性渐变》
var conPreStyle = (conPre=='100%')?('left:100%;margin-left:-2.1rem'):('left:'+ (hasRaise+isRemainNum) +'%');
var jinduHtml = '<div class="bar2" style=width:'+remainPre+'></div><div class="bar3" style='+
raisedPreW+'></div><span style='+conPreStyle+'>'+(hasRaise+isRemainNum)+'%</span>';
//进度条
$(’.bar’).html(jinduHtml)
进度条进度变化,以及显示百分比的框在最右边加个判断
去字符串所有空格
username.replace(/\s/ig,'')
//去掉回车换行符
username.replace(/[\r\n]/g,"")
去掉字符串中的html标签
_content = _content.replace(/<.*?>/ig,"");
css3做switch开关
布局:
<div class="bg_con">
<input id="checked_1" type="checkbox" class="switch" />
<label for="checked_1"></label>
</div>
样式::before 控制背景,:after 控制白色圆圈
.anonymity .bg_con {
float: right;
width: .68rem;
margin-top: .035rem;
}
.switch {
display: none;
}
label {
position: relative;
display: block;
padding: 1px;
border-radius: 24px;
height: 0.35rem;
background-color: #eee;
cursor: pointer;
vertical-align: top;
-webkit-user-select: none;
}
label:before {
content: '';
display: block;
border-radius: 24px;
height: .35rem;
background: #ccc;
-webkit-transform: scale(1, 1);
-webkit-transition: all 0.3s ease;
}
label:after {
content: '';
position: absolute;
top: 50%;
left: 50%;
margin-top: -.161rem;
margin-left: -.23rem;
width: .34rem;
height: .34rem;
border-radius: 22px;
background-color: white;
box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.08);
-webkit-transform: translateX(-9px);
-webkit-transition: all 0.3s ease;
}
.switch:checked~label:after {
-webkit-transform: translateX(21px);
}
.switch:checked~label:before {
background: #DE2418;
}
锚点滚动
$("a.evaluate").click(function() {
$("html, body").animate({
scrollTop: $($(this).attr("href")).offset().top + "px"
}, {
duration: 500,
easing: "swing"
});
return false;
});
placeholder文字靠右对齐
::-webkit-input-placeholder { /* WebKit browsers */ direction: rtl;}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ direction: rtl;}
::-moz-placeholder { /* Mozilla Firefox 19+ but I'm not sure about working */ direction: rtl;}
:-ms-input-placeholder { /* Internet Explorer 10+ */ direction: rtl;}
清除网页缓存
<meta content="no-cache" http-equiv="pragma">
<meta content="no-cache, must-revalidate" http-equiv="Cache-Control">