首页 > 代码库 > css3控制元素旋转

css3控制元素旋转

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        img {
            border: #000 solid 5px;
            display: block;
            margin: 50px auto;
            border-radius: 50%;
            border-top-color:#fff;
            border-right-color:red;
            border-bottom-color:green;
            transition: all 1.5s;
        }

            img:hover {
                transform: rotate(90deg);
            }
    </style>
</head>
<body>
    <img src=http://www.mamicode.com/"images/assets/5.jpg" />
</body>
</html>

 

css3控制元素旋转