Click here to Skip to main content
15,920,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to Add 3 images on page.Change first 2 images when mouse pointer comes on 3rd image Restore back the first 2 images when a pointer leaves 3rd image 
NOTE :- No javascript you can use 
NEED HELP AS SOON AS POSSIBLE.


What I have tried:

<html>
<head>
  <style type="text/css">
  .tuna
  {
   display: inline-block;
   border: 2px solid black;
   margin-right: 30px;
   background-image: url('image04_3.jpg');
   background-repeat: no-repeat;
   height:100px; width:150px;
}
.img1
{
  display: none;
  border: 2px solid black;
  margin-top: 300px;
  height:100px; width:150px;
}

.tuna:hover .img1
{
  background-color: transparent;
   display:inline-block;
}

  </style>
</head>
  <body>
    <figure>
    <div class="big" >
    <div class="tuna"><img class="img1" src="DSC_0032.JPG">
    </div>
    <div class="sun">
    </div>
    <div class="moon">
    </div>
    </div>
    </figure>
</body>
</html>
Posted
Updated 19-Feb-17 17:19pm

1 solution

This should give you some idea.

Mouse hover change color.[^]

When you mouse hover the first box, the colors on second and third will changed, mouse out will restore the color back to original. So instead of images, I used color block.

Here something for you to read:
General Sibling Selector (CSS selector) — SitePoint[^]

CSS Selectors Reference[^]
 
Share this answer
 
Comments
Member 13010669 20-Feb-17 1:31am    
Thank You so much Bryian Tan
Bryian Tan 20-Feb-17 1:37am    
You're welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900