Recent posts

Recent comments

Archive

Calender

«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

최종 수정일 : 2016. 7. 22.


  1. 자바스크립트로, <style> 태그를 하나 만들어서, <head> 태그의 맨 끝에 추가하는 방법이다.
  2. 관리 페이지의 "카테고리 설정"에서, 스타일이 "기본스타일"로 되어있을 경우이다.
    └→  .another_category_color_gray

      "기본스타일"이 아니라면, 다음 목록 중 한가지로 되어있을 것이다.
      .another_category_color_red
      .another_category_color_green
      .another_category_color_blue
      .another_category_color_violet
  3. 아래 내용 중에서, #708090 부분을, 원하는 색상값으로 변경한 후,
    html 문서의 맨 끝에서, </body>의 바로 앞쪽에 보면,
    </s_t3>이라는 "치환자"가 보일 것이다. 그 치환자 바로 앞에다가 넣어주면 된다.
 
<script type="text/javascript">
/* 
 * "카테고리의 다른 글" 영역의 색상 변경하기 
 * 만든이 : http://tonks.tistory.com/100 
 */ 
( function () { 

	 // 1. 새로운 “style” 태그 만들기. 
	 var css = document.createElement ( "STYLE" ); 
 	      css.type = "text/css"; 

	 // 2. “style” 태그에 들어갈 텍스트 만들기. 
	 var text  = ".another_category_color_gray * { color: #708090 !important; } \n"; 
 	      text += ".another_category_color_gray h4, \n"; 
 	      text += ".another_category_color_gray h4 a { color: #708090 !important; } \n"; 

	 // 3. 새로 만든 “style” 태그에 위의 텍스트를 집어넣기. 
	 if ( css.styleSheet )  css.styleSheet.cssText = text; 
	 else css.appendChild (  document.createTextNode ( text )  ); 

	 // 4. “head” 태그의 맨 끝에, 위의 “style” 태그를 집어넣기. 
	 document.getElementsByTagName ( "HEAD" )[0].appendChild ( css ); 
}()); 
</script>
 



이 내용이 도움이 되셨나요? *^^*