간단한 질문 드립니다!

20.09.24 17:19 작성 조회수 50

1

삭제된 글입니다

답변 4

·

답변을 작성해보세요.

1

아... 제가 질문을 정확히 이해를 못했네요.
한글인 경우 줄바뀜이 강제로 되는 현상 말하는거군요.
그건 white-space: nowrap 주면 됩니다.
아래 코드 참고하세요.

<!DOCTYPE html>

<html lang="ko">

<head>

  <meta charset="UTF-8">

  <title>Document</title>

  <style>

    span {

      font-size: 100px;

      position: relative;

    }

    span:before {

      content: attr(data-text);

      color: red;

      position: absolute;

      overflow: hidden;

      width: 0;

      animation: ani 5s both;

      white-space: nowrap;

    }

    @keyframes ani {

      0% {

        width: 0;

      }

      100% {

        width: 100%;

      }

    }

  </style>

</head>

<body>

  <span data-text="건축사무소">건축사무소</span>

  

</body>

</html>

1

전에 저도 한글로 하니까 스페이스 곧 띄어쓰기를 하니까 띄어쓰기를 content 안먹는거 같더라구요.
혹시 한글로 하셨을 때 띄어쓰기 하지 않으셨나요?

0

감사합니다!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ^^ 

0

띄어쓰기를 하지않았는데 그러네욥 ㅜㅜ!!