2018-02-01第一节课

作者: 彭奕泽 | 来源:发表于2018-02-02 13:12 被阅读32次

饥人谷JS Bin

1. css animation

html:

<p></p>

css:

p {
height:100px;
width:300px;
background:#eee;
animation-duration: 3s;
animation-name: slidein;
}

@keyframes slidein {
  from {
    width:100px;
    height:200px;
    background:black;
 }

  to {
    width:300px;
    height:100px;
      background:#eee
  }
}

2. window.open

html:

<button id=myButton>点我</button>
<button id=myButton2>点我2</button>

js:

myButton.onclick = function(){
let windowObjectReference = 
window.open('http://baidu.com','sb',
'width=400,height=400,top=100,left=100');
}

myButton2.onclick = function(){
let windowObjectReference = 
window.open('http://qq.com','sb',
'width=400,height=400,top=100,left=100');
}

3. 进制转换

十进制 ——> 二进制
23(10)——> 10111(2)
0.25(10)——> 0.01(2)

二进制 ——>十六进制,每四个二进制代表一个十六进制数
0001 ——> 1,0010 ——> 2,0011 ——> 3,0100 ——> 4,
0101 ——> 5,0110 ——> 6,0111 ——> 7,1000 ——> 8,
1001 ——> 9,1010 ——> A,1011 ——> B,1100 ——> C,
1101 ——> D,1110 ——> E,1111——> F

二进制 ——> 十六进制
1001 0001(2)——> 91(16)
1101 1011(2)——> DB(16)
0001 1101 1011(2)——> 1DB(16)

本文版权归属于彭奕泽和饥人谷

相关文章

网友评论

    本文标题:2018-02-01第一节课

    本文链接:https://www.haomeiwen.com/subject/oxdjzxtx.html