如何获得二手屏幕的尺寸?
问题描述:
大家好:)
如何获得以像素为单位的已用屏幕尺寸?
在HTML设计中使用它?
还是有一种更简单的方法来使某些东西垂直居中?
在此先感谢:)
Hello all : )
how could I get the used screen size in pixel ?
to use it at HTML design ?
or if there is an easier way to center some thing vertically ?
thanks in advance : )
答
您可以查看:
http://www.w3schools.com/jsref/obj_screen.asp [ http://responsejs.com/labs/dimensions/ [
you can look at :
http://www.w3schools.com/jsref/obj_screen.asp[^]
or
http://responsejs.com/labs/dimensions/[^]
您可以在此处查看示例
http://www.java2s.com/Tutorial/JavaScript/0360__Screen/screen.htm [ ^ ]
You can have a look at and example here,
http://www.java2s.com/Tutorial/JavaScript/0360__Screen/screen.htm[^]