js篇
1.javascript之所以设计成单线程是由他的应用场景决定的,js用来做UI交互,所以必须为单线程.例如单击某个按钮发生跳转,这时候不能进行点击另一个按钮实现滑动操作,不然就乱套了.
css篇
1.盒子模型,box-sizing
盒子模型有content,padding border,margin四部分,IE:width=content+padding+border;标准盒模型:width=content;
box-sizing:border-box此时div定义的width=content+padding+border
box-sizing:content-box此时div定义的width=content
2.1px问题
<meta name="viewport" content="initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5, user-scalable=no">
图片
- 如果是一条线,可以设置div的height为0.5px or 0.25px;视devicePixelRatio
( 物理像素 / 独立像素)
而定- .scale-1px {
width: 100px;
height: 100px;
position: relative;
margin-bottom: 20px;
border: none;
}
.scale-1px:after {
content: '';
width: 400%;
height: 400%;
transform: scale(0.25);
transform-origin: left top;
position: absolute;
border: 1px solid #333;
box-sizing: border-box;
}
<div class="scale-1px"></div>
3.position问题 https://www.jianshu.com/p/6dd34d7f2067
4.块元素和行内元素
略
5.transition 和transform和animation
- tansform
scale() skew() translate() rotate() matrix()
transform-origin设置旋转位置的基点.https://www.cnblogs.com/gaoxuerong123/p/9463422.html- transition
transition-property transition-duration transition-delay transition-timing-function
https://www.cnblogs.com/gaoxuerong123/p/9463545.html- anomation
@keyframes animation-name aniamtion-duraiton animation-timing-function animation-delay animation-direction animation-play-state animation-fill-mode animation-iteration-count
网友评论