html - CSS3 Animations, not quite getting it right -
you can see have tried do. want bottom of each image rollover appear after right pops , fades in. not when mouse hovered on bottom of each image.
i'm having trouble making whole thing clickable blog post without overshadowing/stopping individual links, , short code selection being workable.
i've been @ days no luck... (the social icons, individual links i've not done yet)
anyone see i'm going wrong? i've got fiddle @ bottom. ideally i'd play on hover delay black box @ bottom. i'm close annoyingly annoying.
html:
<body> <div class="wrapper"> <div class="container left"> <img src="http://www.glennleader.co.uk/wp-content/uploads/2014/05/suit6.jpg" alt="image" /> <div class="sig"></div> <div class="innercontent css3-2"> <span class="css3-2 resize"><br/><h2><a href="bloglink">title of blog post</a></h2> <p>april 29, 2014</p> <p><img src="http://www.glennleader.co.uk/wp-content/uploads/2014/05/share-buttons1-e1399999305264.png" /></p> <p class="url"><textarea spellcheck="false">http://shortcodegoeshere.com/334</textarea></p> <p><a href="link1">3/4 length</a> • <a href="link2">agnelli check</a> • <a href="link3">bespoke jacket</a> • <a href="link4">jacket</a> • <a href="link5">london lounge</a></p><span class="clickhere"><a href="bloglink">click here read article</a></span></span> </div> </div><!-- .container --> <div class="container right"> <img src="http://www.glennleader.co.uk/wp-content/uploads/2014/05/suittemp.jpg" alt="image" /> <div class="sig"></div> <div class="innercontent css3-2"> <span class="css3-2 resize"><br/><h2><a href="bloglink">title of blog post</a></h2> <p>april 29, 2014</p> <p><img src="http://www.glennleader.co.uk/wp-content/uploads/2014/05/share-buttons1-e1399999305264.png" /></p> <p class="url"><textarea spellcheck="false">http://shortcodegoeshere.com/334</textarea></p> <p><a href="link1">3/4 length</a> • <a href="link2">agnelli check</a> • <a href="link3">bespoke jacket</a> • <a href="link4">jacket</a> • <a href="link5">london lounge</a></p><span class="clickhere"><a href="bloglink">click here read article</a></<span></span> </div> </div><!-- .container --> </footer> </div><!-- .wrapper --> </body>
css:
*{margin:0;padding:0;} img {margin:0;padding:0px;} .wrapper{ margin:0 auto; width:720px; padding:30px; position:relative; } .left {float:left;} .right {float:right;} p { color:#000; font-size:14px; margin-bottom: 12px; } a{ text-decoration:none; color: #000 } h2, h2 { font-size: 20px; color: #000; line-height: 30px; } h2 a:hover, a:hover { color:#f3625f; } .container{ position:relative; overflow:hidden; width: 300px; max-height: 100%; } .sig { display: block; width: 98%; height: 98%; background: url(http://www.glennleader.co.uk/wp-content/uploads/2014/05/signature.png) bottom right no-repeat ; top: 0; left: 0; position:absolute; overflow: hidden; } .resize { width: 95%; height: 100%; position: absolute; display: block; overflow: hidden; padding: 0 2.5%; top: 0; left: 0; -webkit-transition: .2s ease-out; -moz-transition: .2s ease-out; transition: .2s ease-out; opacity: 0; } .resize:hover { opacity: 1; } .clickhere { position: absolute; display: block; overflow: hidden; width: 300px; height: 20px; padding: 15px 0; text-align: center; bottom: 0; left: 0; background: #000; opacity: 0; -webkit-transition: .3s ease-in; -moz-transition: .3s ease-in; transition: .3s ease-in; animation-delay:2s; -webkit-animation-delay:2s; -moz-animation-delay:2s; } .clickhere:hover { display: block; color: #fff; font-weight: 800; } .clickhere:hover { opacity: 0.5; cursor: pointer; } .clickhere a:hover { color:#f3625f } .url textarea { width: 100%; border: 0 none transparent; margin: 0; padding: 0; outline: 0; resize: none; overflow: hidden; font-family: inherit; background: 0; text-align: center; font-size: 12px; height: 16px; -webkit-appearance: textarea; -webkit-rtl-ordering: logical; -webkit-user-select: text; flex-direction: column; cursor: auto; white-space: pre-wrap; word-wrap: break-word; letter-spacing: normal; word-spacing: normal; text-transform: none; text-indent: 0px; text-shadow: none; display: inline-block; -webkit-writing-mode: horizontal-tb; background: transparent; } .innercontent { display: block; height: 100%; text-align: center; width:100%; background:rgba(255,255,255,0.7); position:absolute; } .css3-2:hover .resize { } .css3-2 { bottom:-370px;left:0; -webkit-transition: .5s ease-out; -moz-transition: .5s ease-out; -o-transition: .5s ease-out; transition: .5s ease-out; } .innercontent a.css3-2{ -webkit-transition: .5s ease-out; -moz-transition: .5s ease-out; -o-transition: .5s ease-out; transition: .5s ease-out; } .container:hover .css3-2 { bottom:4px; cursor: pointer; }
fiddle:
the first issue solved easy... need add ::hover-pseudo class parent element change styles properly.
.css3-2:hover .clickhere a, .clickhere:hover { display: block; color: #fff; font-weight: 800; } .css3-2:hover .clickhere, .clickhere:hover { opacity: 0.5; cursor: pointer; } .css3-2 .clickhere a:hover, .clickhere a:hover { color:#f3625f }
updated fiddle: http://jsfiddle.net/euxgz/5/
(i did not make animation changes, update on issue of displaying link onhover)
edit: if don't want clickable element slide in, give absolute positioning , maybe add different animation (including delay if want wait til slide in done!)
animation-delay:2s; -webkit-animation-delay:2s; /* safari , chrome */
Comments
Post a Comment