Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Cards with effects

  • Hi,
    I followed the instructions from this video to style the cards on the homepage.
    But is not working properly on the mobile view.

    Would you please take a look?

    This is the css added, in addition to some effects.

    /*--------Cards-----*/	
    .mtb-card:before{
    	position: absolute; 
    	content: '';
    width: 50px;
    aspect-ratio: 1/1;
    bottom: 0px;
    right: 0px;
    background-color: var(--base);
    z-index: 1;
    border-top-left-radius:12px;
    transform: translatex(50px);
    opacity:0
    transition: all 250ms ease;}
    .mtb-card:hover.mtb-card:before{
    	transform: translatex(0px);
    	opacity: 1;}
    .mtb-image{
    	position:absolute;
    		top:0;
    		left:0;
    		width:100%;
    		height:100%;
    		object-fit:cover;
    		transition: all 250ms ease;
    	}
    .mtb-card::after{
    	position:absolute;
    	content:'';
    	width:100%;
    	height:120%;
      inset:0;
      background: linear-gradient(180deg, rgba(13,59,102,0) 0%, rgba(13,59,102,1) 100%);
    	transition: all 250ms ease;}
    	.mtb-card:hover.mtb-card::after{
    		height:100%
    	}
    	.mtb-card:hover .mtb-image{
    		transform:scale(1.02)
    	}
    .inside-header.grid-container {
        max-width: 1200px !important;
    }
  • Hi there,

    Can you try adding the CSS to the top of the additional CSS field?

    It looks like the CSS is inside a media query, so it only works on desktop and tablet.

    Let me know if this helps!

  • Thanks Ying!
    Simple but effective trick.

  • You are welcome   🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.