LoginSignup
1
0

More than 3 years have passed since last update.

テスト(初投稿&備忘録)

Posted at

プログラミング初学者です。

body {
  height: 1000px;
  width: 1000px;
  background-image: url("../images/cafe_2.jpeg");
  background-size: cover;
  background-attachment: fixed;
}

とコードを書いたら

スクリーンショット 2021-01-29 16.50.09.png

何故か左寄りになったので

body {
  height: 1000px;
  width: 1000px;
  background-image: url("../images/cafe_2.jpeg");
  background-size: cover;
  background-attachment: fixed;
  margin-right: auto;←追加
  margin-left: auto;←追加
}

としたら

スクリーンショット 2021-01-29 16.54.52.png

中央揃えになりましたw(何故かは理解しておりませんw誰かお暇な方よろしくお願いしますw)

自分はプログラミング歴1年半ですが今までほぼほぼインプットでしか学習して来ませんでした。
なので今後は9:1でアウトプットで学習していくつもりです。

よろしくです。

1
0
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
1
0