본문 바로가기
WWWEB/Script

스크롤바 디자인 변경

by 미니토이 2010. 7. 7.

원문 : http://www.dreamincode.net/forums/topic/15885-change-scroll-bar-color-in-firefox-and-opera/

물론 웹표준에 위배되는 내용이지만, 혹시.. 정말 혹시나 해서 참고로 남겨둔다~ ㅋㄷ


Here's what you can do to make this work in all 3 major browsers (IE, Firefox, Opera):

1) use this code:

01 <style>
02 body{
03     scrollbar-face-color: #808080; /*/ obviously change this to whatever you want /*/
04     scrollbar-arrow-color: #FFFFFF;
05     scrollbar-highlight-color: #FFFBF0;
06     scrollbar-3dlight-color: #808080;
07     scrollbar-shadow-color: #FFFBF0;
08     scrollbar-darkshadow-color: #808080;
09     scrollbar-track-color: #CCCCCC;
10 }
11 </style>
12 <script>
13 function selectCode(f){
14 document.forms[f].elements[0].focus();
15 document.forms[f].elements[0].select();
16 }
17 function changeScrollbarColor(C){
18   if (document.all){
19     document.body.style.scrollbarBaseColor = C
20   }  
21 }
22 </script>


2) in the HTML tag of your webpage, delete ANY and ALL ties to W3C! For example, you will see code generated in the HTML tag when you create a new html page in Dreamweaver like this:

1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">


Kill all of this so the only thing left is the following:

1 <html>
728x90
반응형

댓글