html-鼠标移动后自动旋转

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>

<style>
img{
    -webkit-transition: 0.4s;
    -webkit-transition: -webkit-transform 0.4s ease-out;
    transition: transform 0.4s ease-out;
    -moz-transition: -moz-transform 0.4s ease-out;
}

img:hover{
    transform: rotateZ(360deg);
    -webkit-transform: rotateZ(360deg);
    -moz-transform: rotateZ(360deg);
}


</style>

</head>
<body>
    <a href="www.baidu.com">
    <img src="file://C:/Users/nl28/Desktop/web/1.jpg" width="200" id="1" 
    style="position:absolute; left:800px; top:500px; " >
    </a>
    <img src="file://C:/Users/nl28/Desktop/web/2.jpg"  width="300"  id="2"
    style="position:absolute; left:400px; top:500px; ">
    <img src="file://C:/Users/nl28/Desktop/web/3.jpg"  width="400" id="3"
    style="position:absolute; left:50px; top:100px; ">
    <img src="file://C:/Users/nl28/Desktop/web/4.gif"  width="300" id="4"
    style="position:absolute; left:400px; top:300px; ">


</script>
</body>
</html>

效果图
这里写图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值