프리랜서 웹디자이너 웹퍼블리셔RELATION

RELATION 로고

홈페이지 소스

[CSS] 웹표준,CSS

2014.05.13
북마크 [출처 이동]    작성자 정보
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<title>font</title>


<style type="text/css">
#font1{
/**글꼴 지정.여러개를 지정할경우 콤마(,)로 구분
* - 사용자pc에 첫번째 폰트가 없을경우 두번째 폰트가 사용됨
* - 글꼴의 이름은 쌍따옴표로 묶지 않는다
*/
font-family:궁서,굴림,돋움;

/**글자의 굵기 지정
* normal, bold, bolder, lighter
* 100~900(100단위)
* 100~500:normal
* 600~900:bold
*/
font-weight:bold;

/**글자의 크기 지정
* 단위:px,pt,em
*/
font-size:1.5em;

/**글자의 모양 지정
* normal,italic
*/
font-style:italic;

/**소형대문자의 표기(한글에서는 의미없음)
* normal,small-caps
*/
font-variant: small-caps;
}
#font2{
/**모든글자 관련 속성을 한번에 지정,콤마안됨,공백으로 구분해야함
* [font-style || font-variant || font-weight] font-size,font-family
* [~~]는 생각가능,순서변경가능,
* font-size,font-family는 순서변경안됨,생략안됨
*/
font:italic 15px 돋움;
}
#text1{
/**정렬관련속성
* right, left, center
* box의 정렬과는 관계없음
*/
text-align:left;

/**내용의 형태지정
* underline,overline,line-throungh, blink, none,
* overline과 underline을 같이 사용가능,overline과 line-through와 underline을 같이 사용가능(구분 공백)
* BLINK는 파이어폭스,오페라에서만 적용됨
*/
text-decoration:overline line-through underline;

/**자간*/
letter-spacing:10px;

/**어간(단어사이의 간격)*/
word-spacing:10px;

 

/**줄바꿈관련
* normal:글이 박스를 넘을때 자동줄바꿈(기본)
* nowrap:자동 줄바꿈 안함 */
white-space:nowrap;

/**들여쓰기 관련지정*/
text-indent:50px;
}

/**웹접근성예제*/
h1{
display:block;
width:210px;
height:78px;
background:url(http://static.naver.net/www/u/2010/0611/nmms_215646753.gif);
text-indent:-10000px;/**글씨숨기기*/
}
</style>
</head>

 

<body>
<div id="font1">
이곳은 글자가 표시됩니다.
AAAAAAAA
</div>

<div id="font2">
가나다라마바사
</div>

<div id="text1">
가나다라마바사
<div style="width:100px; background-color:#ff00ff">abcd</div>
</div>

<h1>제목의 사용</h1>
</body>
</html>

이 포스트 공유하기

전체목록