Issues with CSS transitions/animations not functioning properly across different browsers

Take a look at this FIDDLE Link.

I'm facing an issue where the animation works smoothly in Firefox, but it's not functioning as expected in Chrome.

Kindly open the fiddle in both browsers (Chrome and Firefox), hover over the image, and notice the difference.

Here is the CSS stylesheet:

===================================

.portfolio_container {
    position:relative;
    display:block;
    overflow:hidden;
    width:100%;
}
.portfolio_container .portfolio {
    position:relative;
    display:block;
    float:left;
    overflow:hidden;
    width:25%;
    height:auto;
}
.portfolio_container .portfolio .media_box figure a img {
    display:block;
    margin-left: auto;
    margin-right: auto;
}
.portfolio_container .portfolio .media_box .hover_effect {
    top:0;
    left:0;
}

.thumbLink {
    display: block;
    width: 100%;
}
... (CSS continues)

and this is my HTML:

<section class="portfolio_container">

            <article class="portfolio">
                <section class="thumbImage">
                    <img src="http://html5css3templates.com/themes/surrealstudio/templates/images/gallery/gallery-04-thumb.jpg" alt="">
                    ... (HTML code continues)
                </section>
            </article>

        </section>

Your assistance on this matter would be greatly appreciated.

Thank you!

  • Vikas

Answer №1

Include the following CSS in your stylesheet:

.thumbImage:hover img {
    opacity: 0;
    transform: scale(10);
   -webkit-transform: scale(10); /* Make sure to add this -webkit prefix for Chrome */
   -ms-tranform:scale(10);    /** Required for IE10 browser **/
   -o-tranform:scale(10);    /** Needed for Opera browser **/
   -moz-transform: scale(10) /** Use this for older Mozilla browsers **/
}

Check out a demo of this effect on JSFiddle:

http://jsfiddle.net/jkkheni/7gvRT/2/

Answer №2

You forgot to include the -webkit prefix for the transform property.

.thumbImage:hover img {
    opacity: 0;
    transform: scale(10);
    -webkit-transform: scale(10);
}

If you want to learn more about prefixes, check out this link.

Additional information on prefixes:

CSS vendor prefixes or CSS browser prefixes are a way for browser makers to add support for new CSS features in a sort of testing and experimentation period. Browser prefixes are used to add new features that may not be part of a formal specification and to implement features in a specification that hasn’t been finalized.

Source About.com

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Aligning a set of list items horizontally within an unordered list is a great way to maintain a clean

I'm struggling with centering the alignment of li elements within a ul. Below is the excerpt from my code: ul.nav { width: 1000px; margin: 0 auto; list-style-type: none; } .nav li { float: left; width: 300px; } #government { clear: left ...

Overflow on flex layout causes line breaks

I am facing an issue with two divs in a flex container where I want them to be displayed on separate lines when they overflow .container { background: wheat; padding: 10px; width: 300px; display: flex; justify-content: space-betwee ...

Develop a versatile currency symbol mixin that can be used in various small text formats

I am currently working on a website where I need to display prices in multiple locations. To achieve this, I have created a sass mixin that is designed to add the desired currency symbol before the price with a smaller font-size. Below are examples of how ...

"Enhance your website with a dynamic Jssor slider featuring nested slides and vertical

Exploring the idea of merging the nested slider feature with a vertical thumbnail display. Reviewing the source code for examples image-gallery-with-vertical-thumbnail.source.html and nested-slider.source.html, I am wondering how to effectively combine t ...

Trigger a function when the browser automatically populates an input field

I am attempting to trigger a function that can detect if the browser has autofilled a field and then add a specific class to it. After finding a thread with a solution that mostly works, mentioned here: Here is how I implemented it: $.fn.allchange = fun ...

Having trouble getting CSS hover to work on hidden elements?

I am having trouble getting the rollover effect to work correctly on this page, and I can't seem to figure out what's causing the issue. My CSS is quite basic: open{visibility:hidden;} open:hover{visibility:visible;} If you would like to take ...

Ensuring consistent placement and scrollability of two divs across all screen sizes

I am in need of a solution to fix the top and bottom divs in the given image. The scroll should only occur when there is overflow. <!DOCTYPE html> <html> <head> <script src="//code.jquery.com/jquery-1.9.1.min.js"></script> ...

Is there a way to create an <a> element so that clicking on it does not update the URL in the address bar?

Within my JSP, there is an anchor tag that looks like this: <a href="patient/tools.do?Id=<%=mp.get("FROM_RANGE") %>"> <%= mp.get("DESCRITPION") %></a>. Whenever I click on the anchor tag, the URL appears in the Address bar. How can ...

Filtering rows of an HTML table that contain links in the `<href>` column data in real time

When using HTML and JavaScript, I have found a solution that works well for many of the columns I am working with. You can see the details on how to dynamically filter rows of an HTML table using JavaScript here. var filters=['hide_broj_pu',&apo ...

Using NextJs to pass a prop as a className

I'm having difficulty figuring out how to pass a prop to a className, and I'm questioning whether it's even possible. For instance, if the prop category is passed into the function as "category1", can I use styles.category in the ...

navigation menu 'selective emphasis' feature

I have created a JQuery script that will highlight the 'About', 'My Projects', or 'Contact Me' text on the navigation bar when the corresponding section of the page is in view. To achieve this, I am using a scroll() event list ...

What is the best way to access all sections of a JSON file containing nested objects within objects?

Here is an example of my JSON file structure: [{ "articles": [ { "1": { "sections": [ {"1": "Lots of stuff here."} ] } }, { "2": { "sections": [ {"1": "And some more text right here"} ] } } }] The c ...

Experiencing problem with hover:after effect on Internet Explorer 8

I've been working on incorporating the CSS effect found on this website: Everything seems to be functioning properly except for the fix provided for IE8. I added some conditional code so that the fix is only applied to <= IE8, and as a result didn&ap ...

To collapse a div in an HTML Angular environment, the button must be clicked twice

A series of divs in my code are currently grouped together with expand and collapse functionality. It works well, except for the fact that I have to click a button twice in order to open another div. Initially, the first click only collapses the first div. ...

Issues with connecting WordPress taxonomy pages

I created a unique post type called "Sectors" using the following code: add_action( 'init', 'custom_sector_post_type' ); function custom_sector_post_type() { register_post_type( 'sectors', array( 'labels ...

Creating a collapsing drop down menu with CSS

I utilized a code snippet that I found on the following website: Modifications were made to the code as shown below: <div class="col-md-12"> ... </div> However, after rearranging the form tag, the drop-down menu collapse ...

Unable to trigger JQuery .blur event

I am currently working on implementing server-side validation for an input field that needs to be validated when it loses focus. However, I'm running into an issue where the alert is not triggered when the input field loses focus. Here's a snipp ...

Is the .html page cached and accessible offline if not included in the service-worker.js file?

During the development of my PWA, I encountered an unexpected behavior with caching. I included a test .html page for testing purposes that was not supposed to be cached in the sw.js folder. Additionally, I added some external links for testing. However, w ...

Customizing the Class of a jQuery UI ui-autocomplete Combobox Container

Is there a way to customize the ui-autocomplete div by adding a custom class? I have several autocomplete widgets on my webpage, and I need to style their drop-downs differently. Since editing the ui-autocomplete class directly is not an option, I am wor ...

Values do not appear as expected post PDF conversion using wkhtmltopdf

Currently, I am updating certain values within my HTML page by following this process: The function: function modifyContent(){ var newTitle = document.getElementById('myTextField1').value; if( newTitle.length==0 ){ alert('Plea ...