background-repeat 배경이미지 반복여부 설정
background-image: url(경로) 배경이미지 파일경로 지정
background-repeat: 반복여부
repeat 반복
no-repeat 반복안함
repeat-x 가로방향 반복
repeat-y 세로방향 반복
html)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, height=device-height, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0"> <title>Insert title here</title> <style> div { height: 130px; border: 1px solid #000; margin-bottom: 5px; } /* background-image: url(경로) 배경이미지 파일경로 지정 background-repeat: 반복여부 repeat 반복 no-repeat 반복안함 repeat-x 가로방향 반복 repeat-y 세로방향 반복 */ .repeat { background-image: url(images/tile.png); background-repeat: repeat; } .no-repeat { background-image: url(images/tile.png); background-repeat: no-repeat; } .repeat-x { background-image: url(images/tile.png); background-repeat: repeat-x; } .repeat-y { background-image: url(images/tile.png); background-repeat: repeat-y; } </style> </head> <body> <div class="repeat"></div> <div class="no-repeat"></div> <div class="repeat-x"></div> <div class="repeat-y"></div> </body> </html> | cs |
결과
'IT > - 프로그래밍' 카테고리의 다른 글
HTML5/CSS3 background-clip: content-box 배경을 content영역에만 보이도록 한다 (0) | 2017.06.08 |
---|---|
HTML5/CSS3 background-position : 배경이미지 위치 지정하기 (0) | 2017.06.07 |
HTML5/CSS table 태그 쓰지 않고 테이블 표현하기 (0) | 2017.06.05 |
HTML5/CSS3 페이징 구성하기 (0) | 2017.06.04 |
HTML5/CSS3 word-break, white-space : 줄바꿈 속성 (0) | 2017.06.03 |