zoukankan      html  css  js  c++  java
  • 动画

     

      动画:

      1)css样式提供运动

      2)js提供的运动

      过渡的属性:transition 从一种情况到另一种情况叫过渡

      transition:变化的属性  (attr)

      transition:花费的时间  (time)

      transition:变化的速度( linear)

      transition:delay (延迟)向后推迟多少秒发生

      transition:display:  显示隐藏

      运动考虑的情况:

      距离    时间     步长(速度,在HTML中单位是像素,所以叫步长)  总步长   起始距离 (一般跟position:absolute   中的 left    有关 )       当前距离   平均每步(距离除以总步长)

      元素的 client offset scroll  系列

      clientWidth    client Height

      client Left       client Top

      offset Width      offset Height

      offset Left           offset Top            offset Parent

      scroll Width          scroll Height

      scroll Left                scroll Top      

      这十三个属性,前面是一个只读属性         scroll Top  和  scroll Left 是既可读,也可写

      获取浏览器的body属性是有兼容的  (主要是针对ie浏览器)

      var dd=document.body||document.documentElement

      获取body整个文档的高用

      var dd=document.body.scrollHeight||document.documentElement.scrollHeight

      获取浏览器屏幕的高

      var dd=document.body.clientHeight||document.documentElement.clientHeight

      赋值的时候不能用 ||       只能在获取元素的时候用  ||

      scrollTop和scrollLeft   最小值是0;

      window下的两个事件;

      onscroll  当滚动条滚动的时候触发   (写法为:window.onscroll=function(){})

      onresize   当窗口发生改变的时触发  (写法为:window.onresize=function(){})

      scroll 如果想用这个属性  必须加overflow:auto;

  • 相关阅读:
    阿里云nginx创建多站点
    linux 卸载php mysql apache
    centos php环境搭建
    jquery simple modal
    nodejs 安装express
    nodejs fs.open
    nodejs supervisor
    nodejs 运行
    nodejs shell
    PHP array_pad()
  • 原文地址:https://www.cnblogs.com/gdqx/p/10039442.html
Copyright © 2011-2022 走看看