Differences between revisions 6 and 7
Revision 6 as of 2005-11-13 10:28:54
Size: 2724
Editor: 127
Comment:
Revision 7 as of 2005-11-13 10:32:10
Size: 3099
Editor: 127
Comment:
Deletions are marked like this. Additions are marked like this.
Line 79: Line 79:
alternate stylesheet사용하기. (JavaScript등으로 화면에 적용하는 [CSS]를 그때그때 바꿀 수 있다.)
{{{
<link rel="stylesheet" type="text/css" href="default.css" title="default">
<link rel="alternate stylesheet" type="text/css" href="large.css" title="large">
<link rel="alternate stylesheet" type="text/css" href="larger.css" title="larger">
}}}

CascadingStyleSheet

http://www.w3.org/Style/CSS/

[HTML]문서의 다양한 레이아웃과 꾸미기를 가능하게 한 StyleSheet. SeeAlso ChangeYourCss

관련정보

사용법

입력방법

기본적으로 다음의 서식으로 입력된다. {{| SELECTOR {속성 : 값} |}}

예를 들어 다음은 H1테그를 다음의 스타일이 적용되도록 한다.

H1{font size: 24pt; color : blue}

다음은 H1,H2,H3을 모드 같은 스타일로 한다.

H1,H2,H3{font size: 24pt; color : blue}

특정한 class 를 지정한 테그에만 적용할 수도 있다.

.myclass{font size: 24pt; color : blue}

특정한 id를 지정한 테그에만 적용할 수도 있다.

#myid{font size: 24pt; color : blue}

링크부분에 대한 스타일설정

A:link{color : blue}
A:visited{color : green}
A:active{color : black}
A:hover{color : yellow}

일부부분에 대한 설정 (div로 감싸진 영역 : <div class="aaa"></div>)

div.aaa table {
    background-color:blue;
}

CSS 삽입

<style type="text/css">
<!--
.warning{color:#ff0000} /*주의는 빨간색으로 */
#special{font-weight:bold} /*여기는 굵게 */
-->
</style>

다른 파일을 부를경우

<link rel="stylesheet" href="default.css" type="text/css">

최신 [CSS]를 지원하지 않는 웹브라우저를 위해. (그리고, 주요내용은 main에, 특이 내용은 custom에 기입하기)

<style type="text/css">
    @import "master.css"
    @import "custom.css"
</style>

alternate stylesheet사용하기. (JavaScript등으로 화면에 적용하는 [CSS]를 그때그때 바꿀 수 있다.)

<link rel="stylesheet" type="text/css" href="default.css" title="default">
<link rel="alternate stylesheet" type="text/css" href="large.css" title="large">
<link rel="alternate stylesheet" type="text/css" href="larger.css" title="larger">

CSS 레이아웃

[HTML]은 다음처럼 작성

<div id="wrapper">
    <div id="head">상단영역</div>
    <div id="sub">좌측서브메뉴영역</div>
    <div id="body">본문영역</div>
    <div id="foot">하단영역</div>
</div>

그리고, CSS는 다음처럼.

#wrapper {
    width: 802px;
}
#head {
    height: 100px;
    border-bottom: 2px solid #ddd;
#sub {
    width: 200px;
    height: 300px;
    float: left;
}
#body {
    float: left;
    width: 600px;
    height: 450px;
    border-left: 2px solid #ddd;
}
#foot {
    clear: both;
    height: 100px;
    border-top: 2px solid #ddd;
}

CSS (last edited 2013-07-05 12:30:14 by 61)

web biohackers.net