![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
轮播原生
zuo_zuo_blog
这个作者很懒,什么都没留下…
展开
-
仿360开机效果
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> .box{ width: 322px; position: fixed; botto...原创 2020-01-16 17:09:20 · 171 阅读 · 0 评论 -
展开动画图原生js版
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> *{ margin: 0; padding: 0; } div{ wid...原创 2020-01-16 16:32:12 · 170 阅读 · 0 评论 -
缓动框架封装最终版
//获取屏幕可视区域的封装 function client(){ if(window.innerHeight!==undefined){ return{ "width":window.innerWidth, "height":window.innerHeight } }else if(document.compatMode==="C...原创 2020-01-16 16:29:26 · 128 阅读 · 0 评论 -
三大家族scroll、offset、client的区别
1.scroll、offset、client宽高的区别 2.scroll、offset、client上下的区别 3.client介绍原创 2020-01-13 17:32:04 · 162 阅读 · 0 评论 -
动画封装代码
1.匀速动画封装 //animate封装 function animate(ele,target){ clearInterval(ele.timer); var speed=target>ele.offsetLeft?10:-10; ele.timer=setInterval(function(){ var val=target-ele.offsetLeft ele...原创 2020-01-09 19:04:46 · 132 阅读 · 0 评论 -
缓动动画offset
1.三个函数 Math.ceil() 向上取整 Math.floor() 向下取整 Math.round() 四舍五入 2.缓动动画原理 盒子位置=盒子本身位置+(目标位置-盒子本身位置)/10 offsetLeft取值本身会四舍五入 3.缓动动画封装 封装模块 function animate(ele,target){ clearInterval(ele.timer); ...原创 2020-01-09 16:59:31 · 158 阅读 · 0 评论 -
offsetLeft之原生js制作轮播
offset:偏移,检测 作用:获取元素尺寸,获取盒子宽高 offsetWidth,offsetHeight 包括宽高本身,padding,border,不包括margin offsetHeight=height+border+padding offsetHeight = Height+padding+border offsetTop和offsetLeft 检测距离父盒子有定位的左上的距离(o...原创 2020-01-09 09:37:16 · 208 阅读 · 0 评论