문장에서 원하는 글자위에 라인긋기 > IT 기술백서

IT 기술백서

직접 알아내거나 검색하기 귀찮아서 모아 둔 것

css | 문장에서 원하는 글자위에 라인긋기

본문

1.PNG

 

위와 같이 원하는 글자 위에 라인을 긋는 방법이다.

 

먼저 html 에서 원하는 위체를 <span class="accent">글자</span> 로 감싸준다.

[code]

<strong><span class="accent">IT</span>·프로그래밍</strong> 개발 강의

[/code]

 

그리고 css 는 아래와 같이 작성한다.

[code]

.accent {

  display: inline-flex;

  flex-direction: column;

  justify-content: flex-end;

  vertical-align: bottom;

  border-top: 5px solid #000;

}

[/code]

댓글 0개

등록된 댓글이 없습니다.

Menu