Search code examples
cssimageresizehoverzooming

Prevent "Hover Zoom" plugin from displaying zoomed img (or adding class to img div)


The Hover Zoom chrome ext. loads the original sized pic upon hover.

For my images, I resized inside css because it saves me the photoshop cropping step. < img src='..images/title.jpg' width='300px' height='auto'/>

But for users who use Hover Zoom, a new class is added to the and the original size will be loaded.

Is there anyone way to prevent hover zoom from working? while keeping the css resize. Thanks in advance.


Solution

  • You can add css like this:

    img {
            width:250px;
            height:61px;
          }
    img:hover {
            width:100%;
            height:100%;
          }