답변 2개 / 댓글 11개
채택된 답변
+20 포인트
css/default.css 에서 body 에 background:#rgbcode 를 넣어주시는 것도 한 방법입니다.
예제) body {margin:0;padding:0;font-size:0.75em;font-family:dotum; background:#ff0000;}
위의 예제는 g5최신버전의 css/default.css에 들어있는 내용에서 배경만 추가한겁니다.
모바일이나 쇼핑몰도 똑같이 원하시면 mobile.css등 css디렉토리내의 다른 파일들도 마찬가지로 수정하시면 될듯합니다.
답변에 대한 댓글 3개
안그래도 전체 적용으로 하려다가.. 그러면 너무 엉뚱한 것까지도 전부 바뀔까봐 저렇게만 썼던건데.. ^^;
body * {background-color:#ff0000;}
뭐 순서상 이게 먼저 선언되고 나머지 것들이 나중에 선언될테니 크게 엇나진 않겠지만 경우에따라 원치않은 엉뚱한 결과가 나올수도 있겠습니다.
가급적이면 배경색이 적용되지 않은 부분을 일일이 찾아서 따로 넣어주시는게 제일 좋구요,
body, #layer1, .layer2 {background-color#ff0000 !important;}
이런식으로 해당하는 부분만 id나 class이름을 넣어서 한번에 해주시면 그나마 조금 낫긴 하겠군요.
body * {background-color:#ff0000;}
뭐 순서상 이게 먼저 선언되고 나머지 것들이 나중에 선언될테니 크게 엇나진 않겠지만 경우에따라 원치않은 엉뚱한 결과가 나올수도 있겠습니다.
가급적이면 배경색이 적용되지 않은 부분을 일일이 찾아서 따로 넣어주시는게 제일 좋구요,
body, #layer1, .layer2 {background-color#ff0000 !important;}
이런식으로 해당하는 부분만 id나 class이름을 넣어서 한번에 해주시면 그나마 조금 낫긴 하겠군요.
head.sub.php파일 맨밑 <body> 바로 밑에
<div id="tong"> 을 삽입하고
tail.php </body> 바로 위에 </div>
그리고 head.sub.php 적당한 곳에 아래 자바스크립트를 삽입합니다.
<script type="text/javascript">
//통 배경색상 설정
$(function(){
$("#tong).css({
"width":document.body.clientWidth+"px",
"height":$(document).height()+"px",
"background":"바꿀 배경색"
});
});
</script>
답변에 대한 댓글 8개
<body>
<div id="tong">
tail.php </body>
</div>
<script type="text/javascript">
//통 배경색상 설정
$(function(){
$("#tong).css({
"width":document.body.clientWidth+"px",
"height":$(document).height()+"px",
"background":"바꿀 배경색"
});
});
</script>
이렇게 하는건가요?
<div id="tong">
tail.php </body>
</div>
<script type="text/javascript">
//통 배경색상 설정
$(function(){
$("#tong).css({
"width":document.body.clientWidth+"px",
"height":$(document).height()+"px",
"background":"바꿀 배경색"
});
});
</script>
이렇게 하는건가요?
<body><div id="tong"></body>
<script type="text/javascript">
//통 배경색상 설정
$(function(){
$("#tong).css({
"width":document.body.clientWidth+"px",
"height":$(document).height()+"px",
"background":"바꿀 배경색"
});
});
</script>
</div>
이렇게 인가요?
<script type="text/javascript">
//통 배경색상 설정
$(function(){
$("#tong).css({
"width":document.body.clientWidth+"px",
"height":$(document).height()+"px",
"background":"바꿀 배경색"
});
});
</script>
</div>
이렇게 인가요?
tail.php 이건 왜 나온거죠?
<body>
<div id="tong">
<script type="text/javascript">
//통 배경색상 설정
$(function(){
$("#tong).css({
"width":document.body.clientWidth+"px",
"height":$(document).height()+"px",
"background":"#ff0000"
});
});
</script>
</div>
</body>
이렇게 붙여넣었는데 아무 반응이 없어요
<body>
<div id="tong">
<script type="text/javascript">
//통 배경색상 설정
$(function(){
$("#tong).css({
"width":document.body.clientWidth+"px",
"height":$(document).height()+"px",
"background":"#ff0000"
});
});
</script>
</div>
</body>
이렇게 붙여넣었는데 아무 반응이 없어요
답변을 작성하려면 로그인이 필요합니다.