슬라이드 1

Similar documents
<3035B0AD D4C5F584D4C5FC0CEC5CDB3DDBAB8C3E6C7D0BDC0C0DAB7E12E687770>

Week8-Extra

Lab1

02 장. 글꼴문단지정하기 이번장에서는스타일시트속성중에서글꼴과관련한속성과문단에관련된속성을살펴보도록하자.

이장에서다룰내용 테두리를제어하는스타일시트 외부여백 (Margin) 과내부여백 (Padding) 관련속성 위치관련속성 2

쉽게 풀어쓴 C 프로그래밍

PowerPoint 프레젠테이션

쉽게 풀어쓴 C 프로그래밍

Front-Side 웹개발의이해 (CSS Basic) 1. CSS 란?

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션

PowerPoint Presentation

PowerPoint 프레젠테이션

PowerPoint Presentation

What Is CSS? Stands for Cascading Style Sheets. Is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents. Styles define h

슬라이드 1

e-비즈니스 전략 수립

예스폼 프리미엄 템플릿

Overall Process

Ext JS À¥¾ÖÇø®ÄÉÀ̼ǰ³¹ß-³¹Àå.PDF

WEB HTML CSS Overview

Javascript

슬라이드 1

Microsoft PowerPoint - aj-lecture1-HTML-CSS-JS.ppt [호환 모드]

Microsoft PowerPoint - SCLURYPCHTYJ

Lab10

Ÿ column-rule 속성은단사이의구분선을표현하기위한속성으로 column-rule-color, column-rule-style, column-rule-width 속성을한번에지정할수있다. 1.4 단의확장 Ÿ column-span 속성은다단을구성할때해당요소가얼마나많은단

웹프로그래밍응용

쉽게 풀어쓴 C 프로그래밍

SK Telecom Platform NATE

쉽게 풀어쓴 C 프로그래밍

Microsoft PowerPoint - 강의노트 2.ppt

쉽게 풀어쓴 C 프로그래밍

<3036B0AD D4C5F584D4C5FC0CEC5CDB3DDBAB8C3E6C7D0BDC0C0DAB7E12E687770>

PowerPoint 프레젠테이션

HTML5

네트워크 명령 실습

Microsoft PowerPoint - web-part02-ch15-문서객체조작.pptx

쉽게 풀어쓴 C 프로그래밍

CAD 화면상에 동그란 원형 도형이 생성되었습니다. 화면상에 나타난 원형은 반지름 500인 도형입니다. 하지만 반지름이 500이라는 것은 작도자만 알고 있는 사실입니다. 반지름이 500이라는 것을 클라이언트와 작업자들에게 알려주기 위 해서는 반드시 치수가 필요하겠죠?

<!DOCTYPE html> <html> <head> #p1{background:#ff0000;} 1 배경색을 16진수지정방식사용 #p2{background:rgb(255,0,0);} 2 배경색을 rgb 지정방식사용 #p3{background:rgba(255,0,0,0

리포트_23.PDF

NATE CP 가이드 1. WML 페이지에서줄바꿈문제 개요 WML 페이지에서줄바꿈은명시적으로 <br/> 태그를사용하여야한다. 설명그림 2 의의도로제작된페이지에서 Card Styles 텍스트와 Select 박스사이에명시적인 <br/> 태그가없어, 그림 1 과같이줄바꿈이되

AMP는 어떻게 빠른 성능을 내나.key

제이쿼리 (JQuery) 정의 자바스크립트함수를쉽게사용하기위해만든자바스크립트라이브러리. 웹페이지를즉석에서변경하는기능에특화된자바스크립트라이브러리. 사용법 $( 제이쿼리객체 ) 혹은 $( 엘리먼트 ) 참고 ) $() 이기호를제이쿼리래퍼라고한다. 즉, 제이쿼리를호출하는기호

1 CSS 개요 1.1 DHTML(CSS) 란? Dynamic Hyper Text Markup Language 의약자이다. 홈페이지를좀더다이나믹하게만들고자고안해낸방법중하나이다. Nevigator 의 DHTML 은 JSS 라불리고 Explorer 의 DHTML 은 CSS

슬라이드 1

웹의 뼈대 HTML의 이해 개요 및 텍스트 태그

Building Mobile AR Web Applications in HTML5 - Google IO 2012

일반인을 위한 전자책 제작 방법

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션

하둡을이용한파일분산시스템 보안관리체제구현

Microsoft PowerPoint - web-part01-ch10-문서객체모델.pptx

PowerPoint 프레젠테이션

Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 11 년 10 월 26 일수요일

untitled

쉽게 풀어쓴 C 프로그래밍



PHP & ASP

PowerPoint 프레젠테이션

미쓰리 파워포인트

3 [CSS] 1. CSS 2. CSS 구문 3. 스타일시트종류 4. CSS 기본속성 (Properties)

1809_2018-BESPINGLOBAL_Design Guidelines_out

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt

html5_04.indd

2 - KTF ME 브라우저로확인한결과. ( 주소입력시 로직접입력 ) Internet Explorer 로 확인한결과

coinone_brand_guide_(KOR) 복사본

PowerPoint 프레젠테이션

ENEX PRODUCT CONTENTS Designed to resemble a nature Prime Series Standard Series Classy (White & Indigo) New Classy (White & Kha

SmartEditor Basic 2.0 개발자 가이드

Syrup Store O2O Marketing Platform/Solution

PowerPoint 프레젠테이션

과정명

PHP & ASP

슬라이드 1

PowerPoint Presentation

adfasdfasfdasfasfadf

Microsoft PowerPoint - web-part02-ch13-기본.pptx


PowerPoint 프레젠테이션

03 ¸ñÂ÷

2009년 상반기 사업계획

Grouping Selectors To minimize the code, you can group selectors.

<4D F736F F D20B5B5B8E9C1F6BFF8C6F9C6AE>

Prototype 분석 - Element 오브젝트 메서드

Contents All about Coco Chanel All about Brand Chanel 1 샤넬의 로고에 관해 6 1 샤넬의 뮤즈들(칼 라거펠트의 뮤즈들) 2 가브리엘 코코 샤넬 6 -뮤즈란? 34 3 샤넬이란? 7-80년대~90년대 초 36 4 디자이너 샤넬

제1장 HTML 문서의 작성

글자가족 type family AG 안상수체 2012 ExtraLight AG안상수체2012 Light AG안상수체2012 Medium AG안상수체2012 Bold AG안상수체2012 ExtraBlod

TViX_Kor.doc

모바일애플리케이션접근성지침

PowerPoint 프레젠테이션

PowerPoint Template

Week3

Jwplayer 요즘 웹에서 동영상 재생을 목적으로 많이 쓰이는 jwplayer의 설치와 사용하기 입니다. jwplayer홈페이지 : 위의 홈페이지에 가시면 JWplayer를 다운 받으실 수 있습니다. 현재 5.1버전

XE 스킨 제작 가이드

쉽게 풀어쓴 C 프로그래밍

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx

Transcription:

CSS3 의사용

CSS? http://www.w3.org/style/css/ 웹문서에스타일 ( 예 ; 글꼴, 색상, 여백등 ) 을추가하는간단한메카니즘

CSS 사용의장점 다양한기능의확장 HTML 의단순한기능 추가및변경을통한확장이가능 통일된문서양식제공 한번의속성정의로여러문서에적용이가능 문서형식의모듈화 사용자환경과상관없는독립된문서제작가능 브라우저에상관없는문서제작지원 문서형식의다양화 CSS 를통해보다다양하고멋진 HTML 문서작성 로딩시간단축 통일된문서양식으로인해처리할데이터양이감소

CSS 적용의예 <html> <head> <title> CSS 사용하기 </title> <style type = "text/css"> h1 { font-size:30pt; color:blue; } </style> </head> <body> <h1> CSS 사용하기 </h1> </body> </html> CSS 적용전 CSS 적용후

CSS 기본구조 선택자 { 속성 : 값 ; } CSS 를사용하여꾸며줄 HTML 의요소 해당속성에지정할값 지정한선택자의어떤부분을꾸며줄것인가를지정하는부분 HTML 요소에서의속성표현 <font size="5" color="green"> font 태그의사용 </font> CSS 에서의속성표현 H1 { font-size: 30pt; color: green; } = : " " 사용하지않음속성구분빈칸 ;

CSS 적용방식 스타일이정의되는위치에따라 임베디드방식링크방식인라인방식 HTML 문서의 <head> 요소안에 <style> 요소를사용하여스타일을정의 HTML 문서와는별도로스타일만지정한 CSS 파일 (*.css) 을만들어링크시킴 HTML 문서의각요소에직접 style 속성을사용해서적용

CSS 적용방식 _ 임베디드방식 <html> <head> CSS </head> <body> </body> </html> <html> <head> CSS </head> <body> </body> </html> <html> <head> CSS </head> <body> </body> </html> <html> <head> <title> 임베디드방식 </title> <style type="text/css"> h1 { font-size:30pt; color:blue; } </style> </head> <body> <h1> CSS 사용하기 </h1> </body> </html>

링크방식 CSS <html> <head> </head> <body> </body> </html> <html> <head> </head> <body> </body> </html> <html> <head> </head> <body> </body> </html> test.css h1 { font-size : 30pt; color : blue; }

링크방식 <html> <head> <title> 링크방식 </title> <link rel="stylesheet" href="test.css" type="text/css"> </head> <body> <h1> CSS 사용하기 </h1> </body> </html>

인라인방식 <html> <head> </head> <body> CSS CSS </body> </html> <html> <head> </head> <body> CSS </body> </html> <html> <head> </head> <body> CSS CSS CSS </body> </html> <html> <head> <title> 인라인방식 </title> </head> <body> <h1 style="font-size:30pt; color:blue"> CSS 사용하기 </h1> </body> </html>

CSS 적용방식의우선순위 3 2 <html> <head> <title> CSS 적용방식의우선순위 </title> <!-- h1 {font-size: 30pt; color:blue} --> <link rel="stylesheet" href="test.css" type="text/css"> <style type="text/css"> h1 {font-size: 10pt; color:green} </style> </head> <body> <h1 style="color: red"> CSS 사용하기 </h1> </body> </html> 1

선택자

선택자종류 선택자이름설명 * 전체선택자 전체에스타일지정 요소 요소선택자 지정한요소에스타일적용 요소. 클래스 클래스선택자 지정한클래스에스타일적용 요소 # 아이디 아이디선택자 지정한아이디에스타일적용 요소1 요소2 자손선택자 지정한요소의자손요소에스타일적용 요소1 > 요소2 자식선택자 지정한요소의자식요소에스타일적용 요소1 + 요소2 인접선택자 요소1 바로다음에위치한요소2에스타일적용 요소 [ 속성 ] 속성선택자 지정한속성에해당하는요소에스타일적용

요소선택자 요소 { 속성 : 값 ; } <!DOCTYPE html> <html> <head> <style type="text/css"> p {font-size: 15pt; color: blue; font-style: italic;} a {font-size: 20pt; color: red; font-weight: bold;} </style> </head> <body> <p> CSS 태그선택자 </p> <a> cs.knou.ac.kr </a> </body> </html>

클래스선택자 요소. 클래스 { 속성 : 값 ; } 같은이름의요소에각각다른스타일적용이가능 /* 클래스이름이 select1인 p 요소에스타일지정 */ p.select1 {font-size: 15pt; font-style: italic;} /* 클래스이름이 select2인모든요소에스타일지정 */.select2 {font-size: 20pt; font-weight: bold;} <p class="select1"> CSS 클래스선택자 </p> <p class="select2"> CSS 클래스선택자 </p> <a class="select2"> www.google.com </a>

아이디선택자 요소 # 아이디 { 속성 : 값 ; } 같은이름의요소에각각다른스타일적용이가능 /* 아이디이름이 select1인 p 요소에스타일지정 */ p#select1 {font-size: 15pt; font-style: italic;} /* 아이디이름이 select2인모든요소에스타일지정 */ #select2 {font-size: 20pt; font-weight: bold;} <p id="select1"> CSS 클래스선택자 </p> <p id="select2"> CSS 클래스선택자 </p> <a id="select2"> www.google.com </a>

속성선택자 속성선택자연산자의종류 요소 [ 속성 ] 요소 [ 속성 =" 값 "] 속성값과상관없이해당속성을사용하는요소에적용 속성값과일치하는요소에적용 요소 [ 속성 ~=" 값 "] 속성값을공백으로구분한요소에적용 요소 [ 속성 =" 값 "] 속성값을 - 로구분한요소에적용 요소 [ 속성 ^=" 값 "] 속성값의시작부분의문자와일치하는요소에적용 요소 [ 속성 $=" 값 "] 속성값의끝부분의문자와일치하는요소에적용 요소 [ 속성 *=" 값 "] 속성값전체중어떤일부분이라도일치하는요소에적용

속성선택자 a{font-family: " 굴림체 "; font-size:50px;} a[title="daum"] {font-weight: bold;} a[title~="cyworld"] {color: red;} a[title ="google"] {color: green;} a[title^="face"] {font-style: italic;} a[title$="ter"] {font-size:40px;} a[title*="utu"] {font-size:30px;} <a title="naver" href="http://www.naver.com"> 네이버 </a><br> <a title="daum" href="http://www.daum.net"> 다음 </a><br> <a title="nate cyworld" href="http://www.cyworld.com"> 싸이월드 </a><br> <a title="google-translate" href="http://translate.google.co.kr"> 구글번역 </a><br> <a title="facebook" href="http://www.facebook.com"> 페이스북 </a><br> <a title="twitter" href="http://www.twitter.com"> 트위터 </a><br> <a title="youtube" href="http://kr.youtube.com"> 유튜브 </a>

글꼴

글꼴관련속성 font-family 글자체지정 serif, sans-serif, cursive, fantasy, monospace, 글자체 ( 굴림체, 궁서체, ) font-size 글자크기지정 수치, 퍼센트 (%), xx-small, x-small, small, medium, x-large, xx-large, smaller, larger font-weight 글자굵기지정 100 200 900, normal, bold, bolder, lighter

글꼴관련속성 font-style 글자스타일지정 italic, oblique, no font-variant 작은대문자로변환 small-caps, normal font 글꼴스타일일괄지정

font-family 속성 <style type="text/css"> body { font-size: 20pt; }.font1 { font-family: HY 헤드라인, 궁서체 ; }.font2 { font-family: serif; }.font3 { font-family: sans-serif; }.font4 { font-family: cursive; }.font5 { font-family: fantasy; }.font6 { font-family: monospace; } </style> <p class="font1"> FONT 글자체지정 </p> <p class="font2"> FONT 글자체지정 </p> <p class="font3"> FONT 글자체지정 </p> <p class="font4"> FONT 글자체지정 </p> <p class="font5"> FONT 글자체지정 </p> <p class="font6"> FONT 글자체지정 </p>

font-size 속성 <style type= "text/css">.font1 { font-size: 15pt; }.font2 { font-size: 30pt; }.font3 { font-size: 100%; }.font4 { font-size: 200%; }.font5 { font-size: xx-small; }.font6 { font-size: x-small; }.font7 { font-size: small; }.font8 { font-size: medium; }.font9 { font-size: smaller; }.font10 { font-size: larger; }.font11 { font-size: large; }.font12 { font-size: x-large; }.font13 { font-size: xx-large; } </style>

font-weight 속성 <style type="text/css"> body { font-size: 20pt; }.font1 { font-weight: 100; }.font2 { font-weight: 400; }.font3 { font-weight: 900; }.font4 { font-weight: normal; }.font5 { font-weight: bold; }.font6 { font-weight: bolder; }.font7 { font-weight: lighter; } </style>

font-style, font-variant 속성 <style type="text/css"> body { font-size: 20pt; }.font1 { font-style: italic; }.font2 { font-style: oblique; }.font3 { font-style: no; }.font4 { font-variant: normal; }.font5 { font-variant: small-caps; } </style> <p class = "font5"> FONT small-caps 지정 </p>

일괄지정 font 속성 <!DOCTYPE html> <html> <head> <style type="text/css"> font: font-style 값 font-weight 값 font-variant 값 font-size 값 /line-height 값 font-family 값행의높이지정.font { font: italic small-caps 700 30pt/50pt serif } </style> </head> <body> <p> 글꼴관련속성일괄지정 </p> <p class="font"> font 일괄지정 </p> </body> </html> line-height 50pt line-height 5pt

사용자폰트스타일지정 @font-face 규칙 사용자가정의한외부의폰트를불러와사용 @font-face { font-family: 폰트이름 ; src: 폰트위치 ; } 폰트포맷에따른브라우저지원현황 IE 9.0 FF Chrome Safari Opera ttf otf eot woff svg

사용자폰트스타일지정 <!DOCTYPE html> <html> <head> <style type="text/css"> @font-face{ font-family: 'myfont'; src: url(chunkfive.otf); } p { font-family: myfont; font-size: 30pt; } </style> </head> <body> <p> CSS3 @font-face </p> </body> </html>

텍스트

텍스트스타일지정 letter-spacing word-spacing text-align vertical-align text-decoration text-transform text-indent line-height 수치, normal 수치, normal left, right, center, justify 수치, %, baseline, super, sub, top, middle, bottom overline, underline, line-through, blink, none none, capitalize, uppercase, lowercase 수치, % 수치, %

글자간격 letter-spacing 속성 <style type="text/css"> body { font-size: 20pt; font-weight: bolder; }.text1 { letter-spacing: normal; }.text2 { letter-spacing: 10pt; }.text3 { letter-spacing: -3pt; } </style>

단어간격 word-spacing 속성 <style type="text/css"> body { font-size: 20pt; font-weight: bolder; }.text1 { word-spacing: normal; }.text2 { word-spacing: 20pt; }.text3 { word-spacing: -5pt; } </style>

수평정렬 text-align 속성 <style type="text/css"> body { font-size: 20pt; font-weight: bolder; }.text1 { text-align: left; }.text2 { text-align: center; }.text3 { text-align: right; }.text4 { text-align: justify; } </style>

수직정렬 vertical-align 속성 body { font-size: 20pt; font-weight: bolder; }.text1 { vertical-align: top; }.text2 { vertical-align: middle; }.text3 { vertical-align: bottom; }.text4 { vertical-align: baseline; }.text5 { vertical-align: sub; }.text6 { vertical-align: super; } <p> 수직정렬하기 <img src="image.jpg" class="text?"></p> <p> 수직 <span class="text?"> 정렬 </span> 하기 </p>

글자장식 text-decoration 속성 <style type="text/css"> body { font-size: 15pt; font-weight: 900; }.text1 { text-decoration: none; }.text2 { text-decoration: underline; }.text3 { text-decoration: line-through; }.text4 { text-decoration: overline; }.text5 { text-decoration: blink; } </style> Opera, Firefox

글자변환 text-transform 속성 <style type="text/css"> body { font-size: 15pt; font-weight: 900; }.text1 { text-transform: none; }.text2 { text-transform: capitalize; }.text3 { text-transform: uppercase; }.text4 { text-transform: lowercase; } </style>

들여쓰기 text-indent 속성 <style type="text/css"> body { font-size: 15pt; font-weight: 900; }.text1 { text-indent: 10%; }.text2 { text-indent: 20%; }.text3 { text-indent: -10%; } </style> ( 기본 )

줄간격 line-height 속성 <style type="text/css"> body { font-size: 15pt; font-weight: 900; }.text1 { line-height: 2; }.text2 { line-height: 400%; } </style> <p> 줄간격지정하기 </p> <hr> <p class="text1"> 줄간격지정하기 </p> <hr> <p class="text2"> 줄간격지정하기 </p> <hr>

그림자효과스타일지정 text-shadow 속성 text-shadow: 가로위치세로위치 [ 농도 ] [ 색상 ]; <style type="text/css"> p { font-weight: bold; font-size: 30pt; text-shadow: 5px 5px 2px blue; } </style> <p> CSS3 font-shadow </p> text-shadow: -5px -5px 2px blue;

특정영역안의텍스트스타일지정 word-break 속성 강제로줄바꿈을지정 속성값 nowrap : 줄바꿈이되지않게지정 break-all : 특수문자를제외하고강제줄바꿈 word-wrap: break-word; 특수문자를포함하여강제줄바꿈 keep-all : 텍스트가한글일경우띄어쓰기기준으로줄바꿈

특정영역안의텍스트스타일지정 word-break 속성 <style type="text/css"> div { width: 250px; font-size: 20px; border:1px solid black; padding: 10px; word-break:???? ;} </style> nowrap break-all keep-all

특정영역안의텍스트스타일지정 text-overflow 속성 긴문장에대하여말줄임을지정 속성값 clip : 영역에맞추어글자를자름 ellipsis : 잘리는끝부분에자동으로 를넣어줌영역에대한 width 값지정 white-space : nowrap; overflow : hidden;

특정영역안의텍스트스타일지정 text-overflow 속성 <style type="text/css"> div { width: 300px; font-size: 20px; border:1px solid black; padding: 10px; white-space: nowrap; overflow: hidden; text-overflow:???? ;} </style> clip ellipse

배경, 색상 박스, 다단