html - How can I get the CSS-Transforms to work -
i got pretty annoying problem, looking @ transformation -> translate.
currently, fading in navigation "blocks" right left. now, want hover effect on every single one, when hover on it, block translates right little bit.
for used code:
.navpoint:hover { -webkit-transform: translate(20px, 0px); -moz-transform: translate(20px, 0px); -o-transform: translate(20px, 0px); -ms-transform: translate(20px, 0px); transform: translate(20px, 0px); }
this should work, looking @ demo, blocks aren't bothered move right.
here demo
i have feeling set not right, please have @ html setup first:
<div class="navigation"> <h2 class="animated fadeinrightbig1 navpoint one">working process</h2> <h2 class="animated fadeinrightbig2 navpoint two">subscribe</h2> <h2 class="animated fadeinrightbig3 navpoint three">contact us</h2> </div>
explaination: "animated" general animation, custom times , delays set in each of "fadeinrightbig's".
the "navpoint" looks this:
.navpoint { padding-left:5px; padding-right:5px; margin-top:0px; margin-bottom:1px; border-right:solid; border-color:#333; border-width:4px; background:#fc3; cursor:pointer;
}
the "one/two/three" in html set underclass of navpointm, this:
.navpoint.one { width:96.73202614379085%;
}
this setup, , guess wrong navpoint classes, don't know what. very, kind if answer question , me.
thank in advance.
you try using transitions property effect:
.navpoint { padding-left:5px; padding-right:5px; margin-top:0px; margin-bottom:1px; border-right:solid; border-color:#333; border-width:4px; background:#fc3; cursor:pointer; transition:all 1s ease-in-out; -webkit-transition:all 1s ease-in-out; } .navpoint:hover { margin-left: 20px; }
working example can seen here: http://codepen.io/jonwelsh/pen/sfewj
Comments
Post a Comment