function runAsync(){ return newPromise(function(resolve, reject){ setTimeout(()=>{ console.log('执行完成'); resolve('随便什么数据'); },1000) }) } runAsync().then()
结构语义化标签:header nav footer article 媒体标签 video audio embed
animation: pendulum 4s infinite; @keyframes pendulum{ 0 {transform: rotate(0deg);} 25% {transform: rotate(-30deg);} 50% {transform: rotate(0deg);} 75% {transform: rotate(30deg);} 100% {transform: rotate(0deg);} }
一: .parent{ display: flex; justify-content:center; align-items:Center; } 二: .parent { display: table-cell; text-align: center; vertical-align: middle; } .child { display: inline-block; } 三: .parent { position: relative; } .child { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 80px; margin: auto; } 四: .child{ position: absolute; top: 50%; left: 50%; /*定位margin-left:50%的位置*/ transform: translate(-50%,-50%); /*使元素自己向左 }
https://blog.csdn.net/zouzixu...
九种缓存: https://www.jianshu.com/p/2e1...es6
HTTP协议传输的数据都是未加密的,也就是明文的,所以使用HTTP协议传输隐私信息很是不安全,为了保证这些隐私数据能加密传输,因而网景公司设计了SSL(Secure Sockets Layer)协议用于对HTTP协议传输的数据进行加密,从而就诞生了HTTPS。简单来讲,HTTPS协议是由SSL+HTTP协议构建的可进行加密传输、身份认证的网络协议,要比http协议安全。
HTTPS和HTTP的区别主要以下:
一、https协议须要到ca申请证书,通常免费证书较少,于是须要必定费用。设计模式
二、http是超文本传输协议,信息是明文传输,https则是具备安全性的ssl加密传输协议。跨域
三、http和https使用的是彻底不一样的链接方式,用的端口也不同,前者是80,后者是443。promise
四、http的链接很简单,是无状态的;HTTPS协议是由SSL+HTTP协议构建的可进行加密传输、身份认证的网络协议,比http协议安全。浏览器
工做原理:缓存
$(".nav li").click(function(){ let i = $(this).index(); $('.nav li').eq(index).addClass("active").siblings().removeClass("active"); })