1 2 3 4 | - background:url('./img_game/background/1.png') no-repeat center top; - -webkit-background-size: cover; - -moz-background-size: cover; - -o-background-size: cover; | cs |
HTML&CSS
- 반응형 background-image 2017.03.30
- 수직가운데정렬 2017.02.26
반응형 background-image
2017. 3. 30. 10:53
수직가운데정렬
2017. 2. 26. 03:32
텍스트 수직 가운데 정렬
1 | p {line-height:14px;} | cs |
요소 수직 가운데 정렬
1 2 3 4 5 6 7 8 9 10 | .wrapper { display: table; width: 500px; height: 500px; } .cell{ display: table-cell; vertical-align: middle; } | cs |
정렬할 블럭의 바깥에 display :table 속성을 주고 크기를 정한후
정렬할 블럭에 .cell의 속성을 준다.
'HTML&CSS' 카테고리의 다른 글
반응형 background-image (0) | 2017.03.30 |
---|