Home  >  Article  >  Web Front-end  >  5 types of coordinates of js Event objects_javascript skills

5 types of coordinates of js Event objects_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:02:251147browse

But you know, the browser is too disharmonious. Not to mention compatibility, the various coordinate attributes are dizzying and easy to confuse. Well, let me summarize:

Test browsers: IE8, Chrome13, FF8, Safari5, Opera11
First, let’s take a look at the test cases (test with HTML5 doctype, you can also see the future development trend, Other doctypes can be tested by yourself):

Copy code The code is as follows:




< ;style type="text/css">
html {
background:red;
}
body {
background:green;
}
#null {
height:1000px;
}
#btn {
cursor:default;
background:blue;
width:50px;
height:30px;
line-height :30px;
text-align:center;
}



Blank area

Click