- This topic is empty.
-
AuthorPosts
-
March 11, 2013 at 1:29 am #43299
Jaseon
MemberSo im trying to make a Image hover, something like Netflix really.
You hover and a Player Button with Opacity shows.Explains what im after, sadly dunno how to do this still a newbie to css would appreciate some help alot.
March 11, 2013 at 1:42 am #127705chrisburton
ParticipantYou can set the opacity by using the opacity property.
March 11, 2013 at 1:48 am #127706Jaseon
MemberThanks Chris, but not really what i was looking for.
I want the “Player Trailer Image” to appear on top of the other image on hover.March 11, 2013 at 2:30 am #127707chrisburton
ParticipantUpdate the URL to the photo. I don’t see the “Play Trailer Image”.
March 11, 2013 at 2:33 am #127708Jaseon
MemberMarch 11, 2013 at 9:41 am #127738chrisburton
ParticipantI was thinking about something like this http://codepen.io/chrisburton/pen/olwIk but there’s an issue on hover. It cuts in an out when you move your mouse around the thumbnails.
March 11, 2013 at 9:46 am #127739Kitty Giraudel
Participant> I was thinking about something like this http://codepen.io/chrisburton/pen/olwIk but there’s an issue on hover. It cuts in an out when you move your mouse around the thumbnails.
Simply fix the z-index on .play:hover. Problem solved.
Whole code:
div { position: relative; }
.movie {
position: relative;
z-index: 1;&:hover {
z-index: -1;
}
}.play {
position: absolute;
left: 0;&:hover {
z-index: 1;
}
}March 11, 2013 at 10:10 am #127743Jaseon
MemberThank you so much for taking time guys, still cant get it working tho hmm.
Dunno if i accidentally edited the Codepen link and somehow it saved.Mind sending me a new link @Chrisburton
March 11, 2013 at 10:21 am #127744chrisburton
Participant@Jaseon I updated the pen to @HugoGiraudel’s fix (thank you). The reason it might not have worked is because he is using SASS.
March 11, 2013 at 10:24 am #127745Jaseon
MemberYou saved me, thank you so much !
I really really really appreciate that.March 11, 2013 at 10:28 am #127747Kitty Giraudel
Participant> The reason it might not have worked is because he is using SASS.
Sorry. Habits.
March 11, 2013 at 10:32 am #127748Jaseon
MemberOne question, if i want to add it to multiple images what do i edit/add
Just instead of making several new .play and .movie codes, what could be a solution.March 11, 2013 at 10:34 am #127749chrisburton
Participantand here is a simplified version if you want: http://codepen.io/chrisburton/pen/Bioea
add a class of `movie` to the movie thumbnails and a class of `play` for the hover “play trailer” thumbnail is the way I’d do it.
Since I don’t know your markup structure, I can’t really say. Perhaps someone else could lend a hand.
March 11, 2013 at 10:43 am #127750Jaseon
MemberOh i get it now. alright yet again thank you @chrisburton
[Solved]March 11, 2013 at 10:59 am #127752chrisburton
ParticipantI believe you could also use jQuery to add a class of `.play` (or append some html) to the image on hover. That isn’t my area though.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.