html5 - Scale round button on hover without scaling button icon -
i'm trying have round button search icon , when hovered round button should scale whereas search icon should remain same.
this i'm trying
for parent "div" in :after class i'm putting "search glypicon" , position middle of "button" , on hover of "button" scaled using css "transform" property , "search glyphicon" not affected outside "button".
issue i'm facing "search glyphicon" part of parent "div" of "button" lies on top of "button" , hover not work of position on "search glyphicon".
if there other alternative let me know,
here's demo
html
<div class="global-search-form" role="search"> <button aria-label="search" class="btn btn-default" type="submit" data-toggle="modal" data-target="#global_search_widget"> <div class="mask-search"></div> </button> </div>
the transform effect should take place when hovering on parent element.
you therefore change selector .global-search-form button:hover
to .global-search-form:hover button
.
.global-search-form:hover button { border-color: #0064d2; background: #ffffff; -webkit-transform: scale(1.1); -moz-transform: scale(1.1); -ms-transform: scale(1.1); -o-transform: scale(1.1); transform: scale(1.1); }
Comments
Post a Comment