답: 텍스트 장식의 길이/위치를 어떻게 바꿉니까? 밑줄?대답: 텍스트 장식의 길이/위치를 어떻게 바꿉니까? 밑줄?

1306 단어

대답: 텍스트 장식의 길이/위치를 어떻게 바꿉니까? 밑줄?


2018년 7월 25일
5

그래디언트를 사용하여 크기와 위치를 쉽게 조정할 수 있습니다.
.underline {
  background-image: linear-gradient(#5fca66, #5fca66);
  background-position: bottom center; /*Adjust the background-position to move the line*/
  background-size: 80% 2px; /*Adjust the background size to control length and height*/
  background-repeat: no-repeat;
  padding-bottom: 4px; /* this can also control the position

Open Full Answer
텍스트 데코레이션은 텍스트 길이에 맞게 길이가 제한됨
=> 이 방법으로 원하는 길이/위치/두께 조절이 비교적 쉽고빠름

좋은 웹페이지 즐겨찾기