body { margin: 0; padding: 0; } h1 { background: linear-gradient(45deg, #833ab4, #fc9d45, #fc4545, #edfc45, #66fc45); -webkit-background-clip: text; color: transparent; } h3{ text-shadow: 1px 1px 2px #ff69b4 ; } @media screen and (max-width: 768px) { p { background-color: black; color: green; } } @media screen and (max-width: 480px) { p { background-color: black; color: red; } } @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) { } .bg-transparent { position: relative; padding: 100px 0; height: 100vh; /* 画面の高さいっぱいに広げる */ background-size: cover; } .bg-transparent::after { content: ""; position: absolute; top: 0; left: 0; opacity: 0.7; width: 100%; height: 100%; background-image: url('test.jpg'); background-repeat: no-repeat; background-size: cover; background-position: right; z-index: -1; /* テキストが上に来るようにするために追加 */ } .class0 { color: #ff0000 ; } .class1 { color: #9400d3 ; } .class2 { color: #f08080 ; } .class3 { color: #32cd32 ; } .class4 { color: #0000cd ; } .class5 { color: #d2691e ; } body { margin: 0; padding: 0; font-family: Arial, sans-serif; } #loading-wrapper { position: fixed; width: 100%; height: 100%; left: 0; top: 0; background-color: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center; color: #FFF; font-size: 20px; z-index: 1000; /* 他の要素より手前に表示 */ } #loading-content { border: 3px solid transparent; border-top-color: #4D658D; border-bottom-color: #4D658D; border-radius: 50%; width: 50px; height: 50px; animation: loader 2s linear infinite; } #loading-text { margin-top: 10px; } @keyframes loader { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } #content { display: none; /* ローディングが完了するまで非表示にする */ text-align: center; padding: 20px; } #content h1 { color: #333; } #content p { color: #666; } /* ローディングが完了したら#contentを表示するためのスタイル */ .loaded #content { display: block; } /* ローディング中は#loading-wrapperを表示するためのスタイル */ .loading #loading-wrapper { display: flex; }