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.

updated example here

.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

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -