Computer >> 컴퓨터 >  >> 프로그램 작성 >> CSS

CSS를 사용하여 3차 베지어 곡선 정의

<시간/>

큐빅 베지어 곡선을 정의하려면 큐빅 베지어() 함수를 사용하십시오. 다음 코드를 실행하여 cube-bezier() 함수를 구현해 볼 수 있습니다.

예시

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            width: 100px;
            height: 100px;
            background: yellow;
            transition: width 3s;
            transition-timing-function: cubic-bezier(0.3, 0.3, 2.0, 0.9);
         }
         div:hover {
            width:200px;
         }
      </style>
   </head>
   <body>
      <p>Hover over the below container:</p>
      <div></div>
   </body>
</html>