码迷,mamicode.com
首页 > Web开发 > 详细

css3 旋转 过渡 实例

时间:2015-09-28 23:50:13      阅读:410      评论:0      收藏:0      [点我收藏+]

标签:

鼠标经过时两张图片过渡旋转替换

<!DOCTYPE html>
<html lang="kz">
<head>
    <meta charset="UTF-8">
    <title>css3D旋转</title>
    <style>
        .content{
            height: 300px;
            width: 300px;
            margin:0 auto;
            position: relative;
        }
  .img1,.img2 {
      height: 300px;
      width: 300px;
      display: block;
     border-radius: 50%;
      position: absolute;
      top: 0;
      left: 0;
      transition: transform 1s;
      backface-visibility: hidden;
  }
        .img2{
            background: url(images/bg05.jpg) no-repeat;
            transform:rotateY(-180deg);
        }
        .img1{
            background: url(images/bg03.jpg) no-repeat;
            z-index:1;
        }
     .content:hover  .img1{
         transform:rotateY(-180deg);
     }
        .content:hover  .img2{
            transform:rotateY(0deg);
        }
 </style>
</head>
<body>
<div class="content">
    <div class="img1"></div>
    <div class="img2"></div>
</div>
</body>
</html>

css3 旋转 过渡 实例

标签:

原文地址:http://www.cnblogs.com/aytsoft/p/4845244.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!