WEB/CSS

[CSS] ch05-07. transition2

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

07_transition.html

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Transition</title>
<style>
    @import "../css/07_transition.css";
</style>
</head>

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

 

07_transition.css

@CHARSET "UTF-8";
#ex div{
    width: 100px;
    height: 100px;
    border-radius: 0px;
    border: 2px solid black;
    background: url(../img/f1.png) no-repeat center center padding-box;/*x축 중간(left), y축 중간(right)*/
    transition: all 1s ease-in 0.3s;
}
#ex:hover div{
    border-radius: 50px;
    border: 2px solid blue;
    background: url(../img/f2.png) no-repeat center center padding-box; 
}
 

728x90

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

[CSS] ch05-09. ani  (0) 2017.08.28
[CSS] ch05-08. timingFunction  (0) 2017.08.28
[CSS] ch05-06. transition  (0) 2017.08.28
[CSS] ch05-04. skew  (0) 2017.08.28
[CSS] ch05-03. rotate  (0) 2017.08.28

댓글