首页 >web前端 >html教程 >Hover图片旋转_html/css_WEB-ITnose

Hover图片旋转_html/css_WEB-ITnose

WBOY
WBOY原创
2016-06-24 11:31:591028浏览

<!doctype html><html lang="en"> <head>  <meta charset="UTF-8">  <meta name="Keywords" content="关键字">  <meta name="Description" content="描述">  <title>Hover图片旋转</title>  <style type="text/css">    *{margin:0px; padding:0px;}    body{background:#eaeaea;}    .main{width:960px; margin:50px auto;}    .main a{display:block;width:300px;height:300px; border:5px solid #FFFFFF; box-shadow:1px 1px 1px #cccccc ,-1px -1px 3px #3a3a3a; position:relative; overflow:hidden; float:left; margin:10px;}    .caption{ position:absolute;background:rgba(0,0,0,0.3); color:#FFFFFF; left:0px;  z-index:99; width:300px; line-height:30px; bottom:-30px;}    .caption p{text-align:center; font-size:12px;}    .main a:hover img{transition:all 800ms ease-out; transform:rotate(360deg);}    .main a:hover .caption{transition:all 300ms ease-out; transform:translateY(-100%);}  </style> </head> <body>    <div class="main">        <a href="http://www.baidu.com">            <img  src="Image/start.jpg"    style="max-width:90%" height="300px"/ alt="Hover图片旋转_html/css_WEB-ITnose" >            <span class="caption">                <p>圈圈转起来</p>            </span>        </a>    </div> </body></html>

 

  如图:

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn