Webflow sync, pageviews & more.
NEW
Answers

How can I make a lightbox link play a video immediately after being clicked in Webflow, without displaying the second play button from the embedded Vimeo video?

To make a lightbox link play a video immediately after being clicked in Webflow, without displaying the second play button from the embedded Vimeo video, you can follow these steps:

1. Add a lightbox component to your Webflow project by dragging and dropping it from the Components panel into your desired section or container.

2. Inside the lightbox component, add a Div block (or any other container element) and give it a class name. This will act as a wrapper for our video element.

3. Set the position property of the Div block to relative or fixed, depending on your design requirements.

4. Add an embed element to the Div block by clicking on the Plus icon inside the Div block and selecting Embed.

5. Copy the embed code of your Vimeo video. You can get this code by going to the video's page on Vimeo, clicking on the Share button, and then selecting the Embed option. Customize the embed settings as needed.

6. Paste the embed code into the embed element inside the lightbox component.

7. Now, we need to hide the second play button from the embedded Vimeo video. To do this, add custom CSS code to your project. You can add this code to the Page Settings of your project or to the custom code section in the project settings.

```css
.w-lightbox {
z-index: 9999;
}

.w-lightbox-overlay iframe[src*="player.vimeo.com"] {
pointer-events: none;
}

.w-lightbox-overlay .w-lightbox-frame[src*="player.vimeo.com"] {
pointer-events: auto;
}
```
This code increases the z-index of the lightbox to ensure it's above other elements on the page and modifies pointer events for the embedded Vimeo video, effectively disabling the second play button.

8. Customize the appearance of the lightbox link button by selecting the lightbox component and using the Style panel to adjust its colors, typography, and other visual properties.

9. You can now preview and test your lightbox link. When clicked, the lightbox will open, and the embedded Vimeo video will immediately start playing without displaying the second play button.

By following these steps, you can create a lightbox link that plays a video immediately after being clicked in Webflow, without showing the second play button from the embedded Vimeo video.

Rate this answer

Other Webflow Questions