채택완료

jpg 출력 궁금한점.

2019-03-18 (월) 19:00:33 3,675

#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개 / 댓글 2개

채택된 답변
+20 포인트

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

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

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

Copy
<style>

#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}

</style>

답변에 대한 댓글 2개

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

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