Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Difference value getBoundingClientRect in IE 10 and IE 9

$
0
0

In IE difference value getBoundingClientRect().

HTML:

<form id="form1"><div class="LayoutContainer"><div id="qwe" class="qwe"></div></div></form>

CSS

.LayoutContainer {
    margin: auto;
    width: 0px;
}

html {
    
}

.qwe {
    
    
    width: 150px;
    height: 150px;
    border: 1px solid red;
    box-shadow: 0px 2px 12px rgba(0,0,0,0.34375);
}

JavaScript

var element = document.getElementById('qwe');
alert(element.getBoundingClientRect().left);

1)Browser Mode: IE10 and Document Mode: Standards.

result: 195.5

2)Browser Mode: IE10 and Document Mode: IE9 Standards.

result: 196


-Why different values​​?

-This is bug?

-How fixed?


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>