9
9

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.

縦幅をウィンドウサイズピッタリに。[入門/メモ]

Posted at
style.js
$(function() {
	$(window).load(function(){
		var window_h = $(window).innerHeight();
		$('.mainpages').css('height',window_h+'px');
		$(window).resize(function() {
			window_h = $(window).innerHeight();
			$('.mainpages').css('height',window_h+'px');
		});
	});
});

指定したセレクタをウィンドウ縦と同じサイズに。

style.js
.css('height',window_h+'px');

の部分で記述方法がわからず詰まっていた。

9
9
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
9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?