배경 그림 반복 안되게 하고 싶습니다 정보
배경 그림 반복 안되게 하고 싶습니다본문
고수님들 아래수정좀 부탁합니다.
몇시간을 이리저리 해보아도 배경 그림이 반복이 되서요 반복 안되게 하고싶습니다.
무엇이 잘못됐는지 계속 안되네요 ㅠㅠ
첫번째
<body background="http://www.mysitename.net/bo6/img/bg.gif">
<body background-repeat: repeat-x;>
<body background-repeat: repeat-x;>
두번째
<body background="http://www.mysitename.net/bo6/img/bg.gif">
background-repeat: no-repeat;
background-repeat: no-repeat;
세번째
<style type="text/css">
body {
background-attachment: scroll;
background-color: #ffffff;
background-image: url(./images/bg.gif); <----여기는 http://www.mysitename.net/bo6/img/bg.gif 이런 주소를 넣어야 하나요 그래도 안되던데
background-repeat: repeat-x;
background-position: left top;
}
</style>
body {
background-attachment: scroll;
background-color: #ffffff;
background-image: url(./images/bg.gif); <----여기는 http://www.mysitename.net/bo6/img/bg.gif 이런 주소를 넣어야 하나요 그래도 안되던데
background-repeat: repeat-x;
background-position: left top;
}
</style>
세개다 안되는데 어쩌죠 코드가 분명 어딘가 틀린것 같은데 도와 줏세요
감사합니다.
댓글 전체
대략 다음과 같이 응용하시면 될 것 같습니다.
원하는 형태 하나만 선택하시고 불필요한 소스는 지우시고 필요한 부분은 추가하여 사용하시면 될 듯합니다.
일반적인 형태
<body style="background: url(./images/bg.gif); background-repeat:no-repeat";>
소스를 줄인 형태
<body style="background: url(./images/bg.gif) no-repeat";>
바디 매개 변수 최대 활용 형태
<body style="background-attachment: scroll; background-color: #ffffff; background-image: url(./images/bg.gif); background-repeat: no-repeat; background-position: left top;">
바디 매개 변수 최대 활용 형태 축약
<body style="background: #ffffff url(./images/bg.gif) no-repeat right top fixed";>
스타일 시트 형태
<style type="text/css">
body {
background-attachment: scroll;
background-color: #ffffff;
background-image: url(http://www.jakartaproject.com/img/common/main/top_search.gif);
background-repeat: no-repeat;
background-position: left top;
}
</style>
스타일 시트 축약 형태
<style type="text/css">
body {
background: #ffffff url(http://www.jakartaproject.com/img/common/main/top_search.gif) no-repeat right top fixed;
}
</style>
필요한 변수만 사용한 형태
<style type="text/css">
body {
background: url(http://www.jakartaproject.com/img/common/main/top_search.gif) no-repeat;
}
</style>
참고
background-attachment에는 scroll, fixed(그림고정) 있다.
원하는 형태 하나만 선택하시고 불필요한 소스는 지우시고 필요한 부분은 추가하여 사용하시면 될 듯합니다.
일반적인 형태
<body style="background: url(./images/bg.gif); background-repeat:no-repeat";>
소스를 줄인 형태
<body style="background: url(./images/bg.gif) no-repeat";>
바디 매개 변수 최대 활용 형태
<body style="background-attachment: scroll; background-color: #ffffff; background-image: url(./images/bg.gif); background-repeat: no-repeat; background-position: left top;">
바디 매개 변수 최대 활용 형태 축약
<body style="background: #ffffff url(./images/bg.gif) no-repeat right top fixed";>
스타일 시트 형태
<style type="text/css">
body {
background-attachment: scroll;
background-color: #ffffff;
background-image: url(http://www.jakartaproject.com/img/common/main/top_search.gif);
background-repeat: no-repeat;
background-position: left top;
}
</style>
스타일 시트 축약 형태
<style type="text/css">
body {
background: #ffffff url(http://www.jakartaproject.com/img/common/main/top_search.gif) no-repeat right top fixed;
}
</style>
필요한 변수만 사용한 형태
<style type="text/css">
body {
background: url(http://www.jakartaproject.com/img/common/main/top_search.gif) no-repeat;
}
</style>
참고
background-attachment에는 scroll, fixed(그림고정) 있다.
좋은답변 감사드립니다. ^^*