JSP/HTML

[html] font 설정하기

YOU R PLANET 2021. 12. 6. 12:54

font 설정하기

1. 홈페이지에서 폰트 가져오기

폰트 사이트에서 웹 폰트 가져오기 한 후에 적용하면 된다. (아래 사진 참고)

2. 기본 제공 폰트 사용하기

{
   font-style:
normal/italic/oblique/bold;
   font-size:
숫자px;
   font-weight:
숫자;
   font-family:
글씨체 후보1, 글씨체 후보2;  후보 1이 없으면 2로 넘어가는 형식
   ex) serif(바탕), sans-serif(고딕) ...;
}
위의 조건을 한번에 줄 수 있는  font
{
    font: 스타일 크기 글씨체 후보1, 글씨체 후보2...
   ex) font: italic 50px "arial, sans-serif;
}

text-decoration, text-transform


	<head>
		<style>
			h1 { text-decoration:overline; }			
			h2 { text-decoration:line-through; }		
			h3 { text-decoration:underline; }			
		</style>
	</head>

순서대로 overline, lint-through, underline

<head>
		<style>
			p.upper { text-transform:uppercase; }
			p.lower { text-transform:lowercase; }
			p.capit { text-transform:capitalize; }
		</style>
	</head>

순서대로 uppercase, lowercase, capitalize