WEB/CSS

[CSS] ch05-06. transition

밍글링글링 2017. 8. 28.
728x90

06_transition.html

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Transition timing function</title>

<style>
    @import "../css/06_transition.css";
</style>
</head>

<body>    
    <div id="ex">
        <div></div>
    </div>
</body>
</html>
 
 

06_transition.css

@CHARSET "UTF-8";
/*객체모양 변경*/
#ex div{
    width: 100px; 
    height: 100px;
    background-color: red;
    border-radius: 0px;
    
    transition-property: background-color, border-radius;/*해당하는 2가지 속성에 변형을 준다.*/
    transition-duration: 1s;
}
#ex:hover div{
    background-color: blue;
    border-radius: 50px;
}
 

728x90

'WEB > CSS' 카테고리의 다른 글

[CSS] ch05-08. timingFunction  (0) 2017.08.28
[CSS] ch05-07. transition2  (0) 2017.08.28
[CSS] ch05-04. skew  (0) 2017.08.28
[CSS] ch05-03. rotate  (0) 2017.08.28
[CSS] ch05-02. scale  (0) 2017.08.28

댓글