jQuery | javascript | CSS

04.CSS - 점클래스

Godffs 2009. 7. 27. 16:31
반응형
하나의 스타일시트를 여러번/중복되는 경우에 사용되는 것이 .Class(점클래스)입니다.

                     <html xmlns="http://www.w3.org/1999/xhtml">
                     <head>
                         <title></title>
                         <style type="text/css">
                             .yellowButton { background-color:Yellow; }
                         </style>
                     </head>
                     <body>
                         <input type="button" value="클릭1" class="yellowButton"/>
                         <input type="button" value="클릭2" class="yellowButton"/>
                         <textarea cols="40" rows="3" class="yellowButton"></textarea>
                     </body>
                     </html>

결과화면

점클래스를 이용하셔 스타일시트를 정의 했습니다. (배경색 : 노랑색으로 지정)
타입을 정하고 나서 뒤에 class="점클래스이름"을 입력하셔야 합니다.
반응형