Using only CSS, any way to "flash" an element to draw attention after named anchor click? -
i'm not of web coder. i'm struggling through modifying shopping cart template. i'm using named anchor user down detailed description area. works fine, way jumps kind of disorienting , i'd draw attention heading. below div containing named anchor. i'd preferably flash #more_info_sheets (which heading) or else idtab1 (which content , anchor target)
<div id="bottom_more_info_block" class="mar_b2"> <div id="more_info_block"> <ul id="more_info_tabs" class="idtabs common_tabs li_fl clearfix"> <li><a id="more_info_tab_more_info" href="#idtab1" class="selected">more info</a></li> <li><a href="#idtab5" class="idtabhrefshort">comments(0)</a></li> <li><a href="#idtab311" id="st_easy_tab_1">installation instructions</a></li> </ul> <div id="more_info_sheets" class="sheets align_justify"> <div id="idtab1" class="rte product_accordion open"> [...subject content...] </div> <div style="display:none;"> <div id="new_comment_form"> [...blahblah...] </div> </div> <div id="idtab5" class="product_accordion block_hidden_only_for_screen"> [...blahblah...] </div> <div id="idtab311" class="product_accordion block_hidden_only_for_screen"> [...blahblah...] </div> </div> </div> </div>
what have managed far on own #idtab1 content change yellow background when click link. i'm stuck. first off, don't want stay highlighted. second, isn't slick effect if did go away! third, i'd rather flash heading when clicked, rather #idtab1 itself.
#idtab1:target { background-color: yellow; }
i found javascript based examples on web seemingly want, can't seem javascript work cart i'd rather not go there right now.
source: http://codepen.io/anon/pen/xfjrh
@import "compass/css3"; /** * use :target pseudo-element apply * styles element same id * fragment identifier. * (e.g. `#target-section`) * * pseudo-element can used in * conjunction selector * define variety of target styles. * (e.g. `#target-section:target) */ :target { -webkit-animation: target-fade 1s; -moz-animation: target-fade 1s; -o-animation: target-fade 1s; animation: target-fade 1s; } /** * keyframe animation definition * * 1. insert color of choice here */ @-webkit-keyframes target-fade { { background-color: red; } /* [1] */ { background-color: transparent; } } @-moz-keyframes target-fade { { background-color: red; } /* [1] */ { background-color: transparent; } } @-o-keyframes target-fade { { background-color: red; } /* [1] */ { background-color: transparent; } } @keyframes target-fade { { background-color: red; } /* [1] */ { background-color: transparent; } } /* demo-specific styles */ body { width: 500px; margin: 0 auto; }
Comments
Post a Comment