Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2018年12月.
* Some parts of this feature may have varying levels of support.
Window.screenLeft は読み取り専用プロパティで、ユーザーのブラウザーのビューポートの左端から、画面の左端までの水平方向の距離を、 CSS ピクセル単位で返します。
メモ: screenLeft は古い Window.screenX プロパティの別名です。screenLeft は当初 IE のみが対応していましたが、普及に伴いすべての環境で導入されました。
ブラウザーのビューポートの左端から画面の左端までの CSS ピクセル数に等しい数値。
screenleft-screentop の例では、円が描画されたキャンバスが表示されます。この例では、screenLeft/screenTop と Window.requestAnimationFrame() を組み合わせて、ウィンドウの位置が移動しても画面上の物理的な位置を常に同じまま円を再描画しています。
またコード内では、screenLeft に対応してかどうかを検出するスニペットもあり、対応していない場合は、screenLeft/screenTop は Window.screenX/Window.screenY を使用してポリフィルします。
| CSSOM View Module # dom-window-screenleft |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年9月29日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.