現在、ウェブサイトの背景に画像を設定しようとしていますが、テストのためにローカルホストを使用していますが、設定できません。index.html と同じファイルに画像を配置します。名前もコード「background2.jpg」と同じです。
これはcssファイルの私のコードです:
body
{
background:url("background2.jpg") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
user-select: none;
-moz-user-select: none;
overflow: hidden;
}