zoukankan      html  css  js  c++  java
  • 11.191.动画属性移动单词

    1. 动画

    (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

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

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

    Var dd=document.body||document.documentElement

    scrollTopscrollLeft的最小值是0

    获取body的整个文档的高

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

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

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

    Window下的两个事件

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

    onresize 当窗口发生改变时触发

     

     

     

     

    Scroll

    1. 我们学习的clientoffset scrollwidthscrolleheight都是只读的属性
    2. Scrolltopscrollleft是可读写的属性

    Scroltop的最小值是0存在边界值 当他为0是回到容器的顶部

    最大值是真实的高度-当前容器一屏幕的高度 scrollheight-clientheight

     

  • 相关阅读:
    swoole多进程操作
    LinUX系统ThinkPHP5链接MsSQL数据库的pdo_dblib扩展
    php 访问用友u8数据
    C++/CLI剪辑
    托管代码中调用c++本地代码
    非托管代码中调用托管代码
    Resharper快捷键使用
    Unity3d简便的声音管理方案
    QT离线安装包
    Winform中使用Reactivex代替BeginInvoke/Invoke来更新UI数据
  • 原文地址:https://www.cnblogs.com/zhangtao12/p/9985302.html
Copyright © 2011-2022 走看看