zoukankan      html  css  js  c++  java
  • 动画js版本

      动画:

      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;

  • 相关阅读:
    CentOS 7 设置iptables防火墙开放proftpd端口
    Android手机修改Hosts的方法
    Wireshark提示没有一个可以抓包的接口
    while read line无法循环read文件
    Nagios新添加的hosts和services有时显示,有时不显示问题解决
    Nginx配置http强制跳转到https
    xargs rm -rf 与 -exec rm
    解决vim不能使用方向键和退格键问题
    NRPE: Unable to read output 问题处理总结
    MySQL 5.6 解决InnoDB: Error: Table "mysql"."innodb_table_stats" not found.问题
  • 原文地址:https://www.cnblogs.com/shangjun6/p/9985026.html
Copyright © 2011-2022 走看看