테스트 사이트 - 개발 중인 베타 버전입니다

jpg 출력 궁금한점. 채택완료

적순 6년 전 조회 3,491

#full_page {background:url('../img/main.jpg');no-repeat center center fixed; -webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;z-index:5;margin:0 auto;width:100%;height:100%;zoom:1} // 메인화면 출력

 

#sub_page{background:url('../img/mainn.jpg');no-repeat center center fixed; -webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;z-index:5;margin:0 auto;width:100%;height:200px;zoom:1} // 일반페이지 출력

 

일반페이지에 각각 게시판마다 다른 이미지를 넣어주고 싶은데 공지사항,자유게시판등 위에 소스로 같은 이미지가 뜨네요 다르게 이미지를 넣으려면 소스를 어떤식으로 짜야하나요?

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
e
6년 전

아래 소스를 /bbs/board_head.php 파일에 추가해주고,

이미지는 main_게시판코드.jpg 파일을 올리면 됩니다.

혹시, 적용이 안되면 !important 를 추가해주세요.

</p>

<p><style></p>

<p>#sub_page{background:url('../img/main_<? echo $bo_table ?>.jpg');no-repeat center center fixed; -webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;z-index:5;margin:0 auto;width:100%;height:200px;zoom:1}</p>

<p></style></p>

<p>

로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

적순
6년 전
이미지 출력이 안되고 흰색배경만 뜹니다. !important 어디에 추가하면 되나요?
e
eyekiss
6년 전
이미지 경로와 파일명을 확인해보세요..
예) ../img/main_notice.jpg

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인