zoukankan      html  css  js  c++  java
  • 动画

    提升页面性能优化

    1. 多采用雪碧图
    2. 阻止超链接的默认行为
    3. 减少Dom回流
    4. 减少向服务器请求的次数

    动画

    (1)      Css样式提供了运动

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

    Transition:attr  time  linear  delay;

    Attr 是变化的属性

    Time 是花费的时间

    Linear 变化的速度

    Delay 是延迟

    复习background:url() no-repeat 50% 50% red;

    Background-image

    Background-repeat

    Background-position

    Background-color

    (2)      Js提供的运动

    元素的client offset scroll三个系列

    clientWidth/clientHeight/clientTop/clientLeft

    offsetWidth/offsetHeight/offsetLeft/offsetTop/offsetParent

    scrollWidth/scrollHeight/scrollTop/scrollLeft

    这十三个属性,前面是一个是只读属性,scrollTop和scrollLeft是即可读也可写

    获取浏览器的body属性是有兼容的

    Var dd=document.body||document.documentElement

    scrollTop和scrollLeft的最小值是0

    获取body的整个文档的高

    document.body.scrollHeight||document.documentElement.scrollHeight

    获取浏览器一屏幕的高(浏览器的可视区)

    Document.body.clientHeight||document.documentElement.clientHeight

    Window下的两个事件

    onscroll 当滚动条滚动的时候触发

    onresize 当窗口发生改变时触发

  • 相关阅读:
    c++中多态性、dynamic_cast、父类指针、父类对象、子类指针、子类对象
    Makefile写法
    verilog 随笔
    VHDL设计时参数定义的方法 例子
    Linux ln命令
    linux下使用tar命令
    Linux find命令详解
    图解红外遥控的发射和接收原理
    实战 SSH 端口转发
    数字签名是什么?
  • 原文地址:https://www.cnblogs.com/mo123/p/9984831.html
Copyright © 2011-2022 走看看