@charset "utf-8"; body { background-color: #2884a3; /* 背景色 */ background-image: url("https://www.aikoku.net/michiko2023-07-20/images/yamato12j.jpg"); background-size: cover; /* 全画面 */ background-attachment: fixed; /* 固定 */ background-position: center center; /* 縦横中央 */ font-family: "リュウミン B-KL"; } form { width: 100%; height: auto; margin: 0; /*上、左右、下へ空けるスペース*/ padding: 60px 0px 60px 0px; position:absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,0.4); text-align: center; } form h1{ padding: 10px; margin: 0 20px 0; /*上、左右、下へ空けるスペース*/ } form h2,form p { color: white; font-weight: 300; margin: 0 20px 10px; /*上、左右、下へ空けるスペース*/ font-family: "リュウミン B-KL"; font-size: 20px; line-height: 2em; } form p { font-size: 16px; margin: 0 20px 1em; /*上、左右、下へ空けるスペース*/ line-height: 2em; } form input[type = "id"],form input[type = "password"] { border: 0; background: none; display: block; margin: 20px auto; border: 2px solid #f0f8ff; padding: 15px 10px; width: 250px; outline: none; border-radius: 24px; transition: 0.25s; text-align: center; } form input[type = "id"]:focus,form input[type = "password"]:focus { width: 280px; background-color: #f0f8ff; } form input[type = "botton"]{ border: 0; background: none; display: block; margin: 20px auto; border: 2px solid #f0f8ff; padding: 15px 10px; width: 200px; outline: none; color: white; border-radius: 25px; transition: 0.25s; text-align: center; cursor: pointer; } form input[type = "botton"]:hover { background-color: #002699; border: 2px solid #fff; } @media only screen and (min-width: 0) and (max-width: 480px) { /* 480pxまでの幅の場合に適用される */ *{ margin:0: padding:0; } form { width: 450px; height: auto; padding-top: 150px; padding-bottom: 100px; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,0.5); text-align: center; }