BODY 배경이미지 고정하기
<STYLE TYPE='text/css'>
body { background-attachment: fixed;
background-image: url(주소);
background-repeat: no-repeat;
background-position: 50% 50%;}
</style>
fixed : 배경고정 (없으면 이동함)
url(주소) : 주소란에 이미지 경로및 파일명
no-repeat : 배경이 반복되지않음 (윈도우바탕화면같은....)
50% 50% :1. 앞에 50%는 상하, 뒤에는 좌우위치.
익스플로러창기준 전체길이가 100%, 50%면 절반
2. 픽셀로도 가능합니다.
예로 background-position : 100 100이면 왼쪽상단을
(0,0)으로 보고 100,100의 위치에 배경삽입
3. 상하는 top, bottom
좌우는 left, right 로 설정가능
예로 background-position : bottom right 이면 화면
오른쪽 하단에 위치함
4. 1번 2번 3번 혼용도 가능
예로 background-position : bottom 50% 또는 100 left
또는 50% 200 등등
{body background="bg.gif" bgproperties="fixed"}
또 다른 방법
<style="background-image:url(http://원하는 도메인 주소/background.gif); bgproperties:fixed; background-repeat:no-repeat; background-position:left; filter:alpha(opacity=0);">
혹은, 다음과 같이 <head>와 </head>사이에 넣어 주시면 됩니다
<style type="text/css">BODY {BACKGROUND: url(http://도메인주소/images/apples.jpg) #ffffff fixed no-repeat bottom center}</style>
"프로그래밍 / 기타" 분류의 다른 글
| Textcube 카테고리 목록 출력시 등록된 글의 공개/비공개/발행 여부를 출력하기 (0) | 2014/01/06 |
| Textcube 1.9.0에 TinyMCE 4.0.11 적용하기 (0) | 2013/12/03 |
| GCC virtual method 컴파일 문제 (0) | 2008/12/03 |
| uname (0) | 2008/12/01 |
| Apache 특정 파일 및 하위 디렉토리 접근 제한 (0) | 2008/11/07 |
| .htaccess 활용~ (0) | 2008/01/28 |
| cannot restore segment prot after reloc: Permission denied (0) | 2007/05/23 |
| PuTTY에서 한글 입력하기 (0) | 2007/04/18 |
| PHP SOAP Client 만들기 (0) | 2007/03/06 |
| 윈도우 배치파일을 이용한 백업? (0) | 2007/01/25 |