您的位置:首页 > Web前端 > CSS

CSS3特效之翻转

2017-01-19 22:16 239 查看


鼠标悬停,图片翻转



<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>Document</title>
<style>
#container:before{
content:"";
display:table;
}
#container{
width:250px;
height:250px;
border-radius:50%;
background:-webkit-radial-gradient(circle,#FFFFFF,#F4F4F4,#D3D3D3);
margin:auto;
margin-top:100px;
}
#wrap{
-webkit-perspective:500px;
width:200px;
height:200px;
border-radius:50%;
background-color:#fff;
margin:auto;
margin-top:25px;
}
#images{
-webkit-transform-style:preserve-3d;
-webkit-transition:1.5s;
position:relative;
}
#wrap:hover #images{
-webkit-transform:rotateY(180deg);
}
#images>div{
position: absolute;
-webkit-backface-visibility:hidden;
}
div.back {
-webkit-transform:rotateY(180deg);
}
img{
width:200px;
height:200px;
border-radius:50%;
}
</style>
</head>
<body>
<div id="container">
<div id="wrap">
<div id="images">
<div class="front">
<img src="images/huan.jpg"/>
</div>
<div class="back">
<img src="images/love.jpg">
</div>
</div>
</div>
</div>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  翻转特效