
mytitle 부분에서 width 100%로 설정을 하였는데 흰색 여백이 왜 생길까요.. <!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8"><title>나홀로 연습하는 파일</title><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Do+Hyeon&display=swap" rel="stylesheet"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Gothic+A1:wght@300&display=swap" rel="stylesheet"><style> .mytitle { font-family: 'Do Hyeon', sans-serif; width: 100%; height: 250px; background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("https://movie-phinf.pstatic.net/20210715_95/1626338192428gTnJl_JPEG/movie_image.jpg"); background-position: center; background-size: cover; color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; } .mytitle > p > button { font-family: 'Gothic A1', sans-serif; width: 150px; height: 30px; background-color: transparent; color: white; border-radius: 50px; border: 1px solid white; margin-right: 10px; } </style> </head> <body><div class="mytitle"><h1>오창정의 블로그</h1><p><button>기록하기</button><button>인사하기</button></p></div> </body> </html>
