7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

よくわからなくなる`window`or`Element`直下のfunction or property

Last updated at Posted at 2014-05-10

##window.scrollBy(x,y)

指定量をスクロールする
##window.scroll(x,y)

scrollToと同じ。ページ左上を基準にして絶対値で所定の箇所までスクロールする

window.outer[width,height]

メニューバー等も含めたブラウザ全体のサイズ

window.inner[width,height]

表示領域のサイズ

window.scroll[Y,X]

ページのスクロール量を表示。IE8以下がこのプロパティに対応していない為、
window.page[Y,X]Offsetがエイリアスとして存在する

Element.scroll[Top,Left]

要素内でスクロールした量

Element.scroll[Height,Width]

要素がスクロールできる状態の時にその表示領域のサイズを返す

Element.offset[Width,Height]

要素のサイズwidth/height + border + padding + scrollbar

Element.offset[Top, Left]

親要素からの距離を返す。Element.offsetParentで基準となる親を取得出来る

Element.client[Width,Height]

要素のスクロールバーの以外のサイズの合計
要素がoverflow:hideen等で表示しきれてなかった場合は表示領域のサイズみ返す

Element.scroll[Width,Height]

要素のスクロールバーの以外のサイズの合計
要素がoverflow:hidden等で表示してなかったとしても全体のサイズを返す

Element.getBoundingClientRect()

返却されたオブジェクトは下記を保持

  • width 要素の幅
  • height 要素の高さ
  • top 要素上部の、画面の表示領域上部からの距離
  • left 要素左の、画面の表示領域左からの距離
  • bottom 要素下部の、画面の表示領域上部からの距離
  • right 要素右の、画面の表示領域左からの距離
7
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?