일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- devops
- slack
- 배포
- Pull
- 도커
- CSS
- azure devops
- react
- 배포자동화
- 클라우드
- Azure
- 마이에스큐엘
- CI/CD
- git
- github
- docker
- 리액트
- AWS
- 자동화
- nginx
- 데브옵스
- 자동배포
- node.js
- azure deveops
- MySQL
- deveops
- PIPELINE
- 데이터타입
- aws devops
- 조인
- Today
- Total
Full_Stack developer
CSS 텍스트 정렬 text-align 본문
CSS - CSS text-align 사용해보기 |
1. text-align 왼쪽정렬
File : my.html
<html>
<head>
<link rel="stylesheet" href="my.css" type="text/css">
</head>
<body>
<div id="text_align">
<div class="left"> text-align </div>
</div>
</body>
</html>
File : my.css
@charset "utf-8";
#text_align .left {text-align:left; border:1px solid red;}
출력결과 :
text-align
처음 왼쪽 정렬은 되어 있기때문에 변한것을 느끼기 힘들것입니다
2. text-align 가운대 정렬
File : my.html
<html>
<head>
<link rel="stylesheet" href="my.css" type="text/css">
</head>
<body>
<div id="text_align">
<div class="left"> text-align </div>
<div class="center"> text-align </div>
</div>
</body>
</html>
File : my.css
@charset "utf-8";
#text_align .left {text-align:left; border:1px solid red;}
#text_align .center {text-align:left; border:1px solid red;}
출력결과 :
text-align
text-align
두번째는 중앙 정렬은 되어 있기때문에 변한것을 확인하실수 있습니다
3. text-align 오른쪽 정렬
File : my.html
<html>
<head>
<link rel="stylesheet" href="my.css" type="text/css">
</head>
<body>
<div id="text_align">
<div class="left"> text-align </div>
<div class="center"> text-align </div>
<div class="right"> text-align </div>
</div>
</body>
</html>
File : my.css
@charset "utf-8";
#text_align .left {text-align:left; border:1px solid red;}
#text_align .center {text-align:center; border:1px solid red;}
#text_align .right {text-align:right; border:1px solid red;}
출력결과 :
text-align
text-align
text-align
세번째는 오른쪽 정렬은 되어 있기때문에 변한것을 확인하실수 있습니다
'FE > CSS' 카테고리의 다른 글
css 폰트 속성 알아보자 (2) | 2024.01.25 |
---|---|
css 선택자란 무엇인가? (1) | 2024.01.25 |
CSS 란 ?? (0) | 2024.01.25 |