componentDidMount() {
const LeftHeight = window.getComputedStyle(this.leftDom).height;
console.log(LeftHeight);
setTimeout(function(){
const LeftHeight = window.getComputedStyle(this.leftDom).height;
console.log(LeftHeight);
}.bind(this),1000)
} return (
<ContentWarp>
<div className={ left } ref={ dom => { this.leftDom = dom } }>
<ContentLeft/>
</div>
<div className={ right }>
<ContentRight/>
</div>
</ContentWarp>
)
}

window.getComputedStyle——ref的更多相关文章

  1. js计算机样式window.getComputedStyle(ele,null)2

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. js计算机样式window.getComputedStyle(ele,null)与

    一.getComputedStyle兼容IE8以上,范户籍的计算样式的值都是绝对值,没有相对单位(如:width:10em; 它打印出来是160px) window.getComputedStyle( ...

  3. window,getComputedStyle,letter-spacing

       js 拿到element的css样式    window.getComputedStyle(ele,[pseuso)    比如想拿到一个element的背景色 window.getComput ...

  4. 关于obj.currentStyle.property、window.getComputedStyle(obj,null).property、obj.style.property的理解

    首先是obj,style.property 我一直用这个obj.style.property这个属性来修改内联和外联的obj属性,但是从网上看到了obj.style.property居然只能读取内嵌的 ...

  5. window.getComputedStyle()方法的使用及其扩展

    1.window.getComputedStyle()方法返回值 是一个可以获取当前元素所有最终使用的CSS属性值.返回的是一个CSS样式声明对象([object CSSStyleDeclaratio ...

  6. currentStyle与getComputedStyle应用

    getComputedStyle获取的是计算机(浏览器)计算后的样式,但是不兼容IE6.7.8(主要用于非IE浏览器) currentStyle方法兼容IE6.7.8,但是不兼容标准浏览器(主要用于I ...

  7. style,currentStyle,getComputedStyle的区别和用法

    先说说层叠样式表的三种形式(三种的叫法不一,按照各自的习惯): 一.内联样式:在HTML标签用style属性设置.如: 1 <p >这是内联样式</p> 二.嵌入样式:通过&l ...

  8. getComputedStyle/currentStyle/style之间的爱恨情仇

    getComputedStyle是? getComputedStyle是一个可以获取当前元素所有最终使用的CSS属性值.返回的是一个CSS样式声明对象([object CSSStyleDeclarat ...

  9. getComputedStyle 方法

    一:getComputedStyle getComputedStyle是一个可以获取当前元素所有最终使用的CSS属性值.返回的是一个CSS样式声明对象([object CSSStyleDeclarat ...

随机推荐

  1. linux关于任务计划

    1.一次性任务计划:at 1)添加 在18:16时候重启服务器 at 18:16 >at init 6 >at ctrl+d2)查看 atq 1 Mon Aug 20 21:09:00 2 ...

  2. nginx静态资源web服务

    静态资源:非服务器动态运行生成的文件 浏览器端渲染:html ,css,js 图片:jpeg,gif,png 视频:flv ,mpeg 文件:txt,等任意下载文件 静态资源服务场景:CDN 文件读取 ...

  3. 中国电信物联网平台入门学习笔记7:NB-IOT信号如何检测

    NB-IOT设备会因为信号的原因,数据发不出.但数据发不出的原因有很多,这么排除是NB-IOT信号的问题呢?那就需要NB-IOT信号检测装置. 网上的信号检测设备 作为一个常年蜗居在实验室的穷屌丝而言 ...

  4. 排序 sort函数

    sort函数见下表: 函数名 功能描述 sort 对给定区间所有元素进行排序 stable_sort 对给定区间所有元素进行稳定排序 partial_sort 对给定区间所有元素部分排序 partia ...

  5. Diango 一——URL

    内容概要 1.web框架初识 2.MTV模式 3.Django创建流程和命令行工具 4.配置文件  settings 5.视图函数  views 6.路由系统  URL 7.模板系统  templat ...

  6. loj2000 「SDOI2017」数字表格

    there #include <iostream> #include <cstring> #include <cstdio> using namespace std ...

  7. Selenium WebDriver- 操作frame中的页面元素

    #encoding=utf-8 import unittest import time from selenium import webdriver from selenium.webdriver i ...

  8. day01_04.变量

    变量的命名规则 变量名由字母小写a-z,大写A-Z,_下划线,数字0-9组成,php的变量名区分大小写;python的变量名也是区分大小写的 注意: PHP变量名必须以美元$符号开始; 变量名开头可以 ...

  9. linux随笔4

    vim编辑器: 启动vim编辑器,只需键入vim 和希望编辑的文件:vim mongo.sh 如果文件存在,将显示整个内容显示到进行编辑的缓冲区,如果文件不存在,打开一个新的缓冲区进行编辑. 内容未占 ...

  10. 聊聊、Nginx 安装启动

    首先说下安装 Nginx 的步骤: (1)window 下安装 进入 http://nginx.org/en/download.html 下载版本 Mainline version 或者 Stable ...