div (정의되지 않은 너비)를 가로 세로로, 전체 화면 div의 가운데에 세로로 배치해야합니다.전체 화면 div 안에 div를 가운데 놓습니다.
아래 코드가 있습니다.
외부 사업부 :
background: #000 url('header.jpg') no-repeat center center /* fixed */;
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
height: 100%;
position: relative;
text-align: center;
width: 100%;
내부 사업부 :
left: 50%;
margin-top: -300px;
margin-left: -300px;
max-width: 600px;
position: absolute;
top: 50%;
z-index: 2;
그러나 깨끗하지 않다 - 나는 창 크기를 조정 특히. 그리고 이것은 어떻게 든 세로 중심에 있지 않습니다.
도와 주시겠습니까?
감사합니다.