The earth is rotating in original codes:
<style>
.earth {
position:absolute;
top:0;
bottom:0;
left:0;
right:0;
margin:auto;
width: 677px;
height: 677px;
background: url(http://pic.58pic.com/58pic/17/52/66/05S58PICEZC_1024.jpg);
border-radius: 50%;
background-size: cover;
box-shadow: inset -30px -30px 60px 2px rgb(0, 0, 0),
inset 0 0 20px 2px rgba(255, 255, 255, 0.2);
animation-direction:normal;
animation-name: rotate;
animation-duration: 4s;
animation-iteration-count: infinite;
!--animation-timing-function: linear;--!
animation-fill:forwards;
}
@keyframes rotate {
0% {background-position: 0 0;}
100% {background-position: 1024px 0;}
}
.earth:hover{
-webkit-animation-play-state:paused;
}
.hover_img a { position:relative; }
.hover_img a span { position:absolute; display:none; z-index:99; }
.hover_img a:hover span { display:block; }
</style>
<div class="earth"></div>
But why it is static as an image below? And the hover feature is not working either.
<style>
.earth {
position:absolute;
top:0;
bottom:0;
left:0;
right:0;
margin:auto;
width: 677px;
height: 677px;
border-radius: 50%;
box-shadow: inset -30px -30px 60px 2px rgb(0, 0, 0),
inset 0 0 20px 2px rgba(255, 255, 255, 0.2);
animation-direction:normal;
animation-name: rotate;
animation-duration: 4s;
animation-iteration-count: infinite;
animation-timing-function: linear;
animation-fill:forwards;
}
@keyframes rotate {
0% {position: 0px 0px;}
100% {position: 1024px 0px;}
}
.earth:hover{
-webkit-animation-play-state:paused;
}
.hover_img a { position:relative; }
.hover_img a span { position:absolute; display:none; z-index:99; }
.hover_img a:hover span { display:block; }
</style>
<div>
<img src="http://pic.58pic.com/58pic/17/52/66/05S58PICEZC_1024.jpg" usemap="#map" class="earth"/>
<map name="map">
<area shape="poly" coords="224,330,239,325" href="images/diru.png" alt="" class="hover_img">
</map>
</div>
I want to draw a rotating earth with showing another image at hover the map hotspot. But I find the codes works fine if I use back-ground image in CSS, it fails if the just putting the image into the page. And the hover feature fails, it needs to click the map hotspot to show the new image. And I need a feature to return to the earth image when click any place in new image screen. Please help!