YouTube動画をページ背景で再生表示するCSS記述 ※背景にYouTube動画を表示するエリア(#youtube-area)、Loading表示エリア(#loading)、ヘッダーエリア(#header)背景にローディング画像(loading.jpg)を設定 等のCSS記述です。必要に応じて変更して下さい。 <style> * { padding: 0; margin: 0; } body { font-size: 14px; text-align: center; line-height: 2em; } #header{ position: relative; height: 100vh; text-align: center; color: #fff; background: url("loading.jpg") no-repeat; background-size: cover;
![YouTube動画をページ背景で再生表示する方法【YouTube API】|DAD UNION – エンジニア同盟](https://cdn-ak-scissors.b.st-hatena.com/image/square/4b7ba78063ca3f1dc0f581ed12ebd07d13e2a437/height=288;version=1;width=512/https%3A%2F%2Fdad-union.com%2Fwp-content%2Fuploads%2F2023%2F01%2Fpic20230123.jpg)