1. componentDidMount() {
  2. const LeftHeight = window.getComputedStyle(this.leftDom).height;
  3. console.log(LeftHeight);
  4. setTimeout(function(){
  5. const LeftHeight = window.getComputedStyle(this.leftDom).height;
  6. console.log(LeftHeight);
  7. }.bind(this),1000)
  8. }
  9.  
  10. return (
  11. <ContentWarp>
  12. <div className={ left } ref={ dom => { this.leftDom = dom } }>
  13. <ContentLeft/>
  14. </div>
  15. <div className={ right }>
  16. <ContentRight/>
  17. </div>
  18. </ContentWarp>
  19. )
  20. }

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. Voyager的安装及配置文件

    使用代理服务器安装laravel http_proxy=http://localhost:1080 composer create-project --prefer-dist laravel/lara ...

  2. INDEX && PRIMARY KEY && UNIQUE KEY

    When I have do some sql tody, some confusion come up to me. Its about the index && PRIMARY K ...

  3. selenium - 常用页面操作

    # 2.常用页面操作 # 访问某一个页面url = 'http://www.baidu.com'driver.get(url) # 获取页面的标题title = driver.titleprint(t ...

  4. 简述 yield和yield from关键字

    1.可迭代对象与迭代器的区别 可迭代对象:指的是具备可迭代的能力,即enumerable.  在Python中指的是可以通过for-in 语句去逐个访问元素的一些对象,比如元组tuple,列表list ...

  5. install cinnamon on ubuntu 14.04

    emotion: I feel not comfortable with ubuntu 14.04 default desktop unity,i still look for a alternati ...

  6. EOJ Monthly 2018.1

    985月赛,当时鸽了,现在想补一补 A. 石头剪刀布的套路 Time limit per test: 1.0 seconds Memory limit: 256 megabytes 现在有一种石头剪刀 ...

  7. 设计模式(一)单例模式:3-静态内部类模式(Holder)

    思想: 相比于懒汉以及饿汉模式,静态内部类模式(一般也被称为 Holder)是许多人推荐的一种单例的实现方式,因为相比懒汉模式,它用更少的代码量达到了延迟加载的目的. 顾名思义,这种模式使用了一个私有 ...

  8. C++之Effective STL学习笔记Item20

    Q:假设我们现在需要一个string*的set,我们向其插入一些动物到这个set中: set<string*> ssp; // ssp = “set of string ptrs” ssp ...

  9. 【bzoj1002】[FJOI2007]轮状病毒 矩阵树定理+高精度

    题目描述 轮状病毒有很多变种,所有轮状病毒的变种都是从一个轮状基产生的.一个N轮状基由圆环上N个不同的基原子和圆心处一个核原子构成的,2个原子之间的边表示这2个原子之间的信息通道.如下图所示 N轮状病 ...

  10. 浅谈android反调试之 转发端口

    反调试方案: 我们最通常使用的动态工具是IDA, IDA的动态调试端口默认为23946,我们可以通过/pro/net/tcp 查看android 系统所有TCP Socket 启动android_se ...