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 ; }