Webflow sync, pageviews & more.
NEW

SVG Clip-path for Custom Image Cropping

Example

SVG Clip-path for Custom Image Cropping

Description

Create a responsive clip path for images using SVG shapes in Webflow.This allows you to create unique shaped images using SVG paths rather than DIVs or similar methods.

Instructions

  1. Create your SVG shape in something like Adobe Illustrator.
  2. Export your SVG as code. You can go to File -> Export as -> SVG in the dialogue box you have the option to show code which will generate the code that you need.
  3. Make new path 'relative' - You can do so here (https://yoksel.github.io/relative-clip-path/)
  4. Create element in Webflow. The clip path is going in a div called svg-clip and then you have to put an image inside to fill the width and height by selecting cover.
  5. Add an embed code and copy and paste the code, make sure class names are relevant to the copied code.

Javascript snippet


<script>
$(function () {
  $( "a[data-clean='remove-http']" ).each(function() {
    var clean = $(this).text().replace(/^\/\/|^.*?:(\/\/)?/, '');
    $(this).text(clean);
  });
});
</script>

CSS snippet


<style>
.svg-clip {
  width: 0;
  height: 0;
}

img {
  width: 50%;
  -webkit-clip-path: url(#clip-rip-bottom);
  clip-path: url(#clip-rip-bottom);
}
</style>

HTML snippet


<svg height="0" width="0" class="svg-clip">
    <defs>
        <clipPath id="clip-rip-bottom" clipPathUnits="objectBoundingBox">
            <path d="M0.983,0 H0 L0.018,0.997 l0.018,-0.002,0.009,-0.003,0.005,-0.003,0.01,-0.001,0.01,0.002,0.003,0,0.002,-0.001,0.013,0.001,0.003,-0.001,0.007,0.001,0.004,0.002,0.047,0.008,0.003,0,0.001,0,0.018,-0.002,0.002,-0.001,0.004,-0.001,0.008,0.002,0.002,0.001,0.006,0,0.003,-0.001,0.02,0,0.01,-0.002,0.003,-0.001,0.069,-0.011,0.034,0.004,0.009,-0.002,0.001,-0.001,0.031,-0.007,0.004,-0.002,0.001,0,0.022,0.001,0.019,-0.004,0.005,0,0.01,0.003,0,0,0.025,0.007,0.034,0.004,0,0,0.003,-0.001,0.008,-0.002,0.005,0,0.012,0.003,0.015,-0.004,0.011,0,0.012,-0.003,0.001,0,0.002,-0.001,0.009,-0.002,0.002,-0.001,0.005,-0.001,0.007,0,0.008,-0.002,0,0,0.003,-0.002,0,-0.001,0.004,-0.003,0.001,0,0.015,-0.003,0.018,0.003,0.004,-0.001,0.004,-0.003,0.023,-0.007,0.012,-0.001,0.013,0.002,0.026,-0.003,0.003,0,0.003,0,0.002,-0.001,0.016,-0.002,0.016,0,0.008,0.002,0.009,0,0.015,0.004,0.017,-0.001,0.008,0.002,0.018,0.001,0.003,0.001,0.007,0,0.007,-0.001,0,0,0.014,-0.003,0.013,0.001,0.015,-0.005,0.012,0,0.004,0.001,0.035,-0.001,0.001,0,0.003,0,0,0,0.006,0,0.017,0.005,0.012,-0.001,0.004,0,0.004,0.001,0.006,0,0.005,-0.001,0.002,-0.001 L0.983,0 h0" />
        </clipPath>
    </defs>
</svg>
Force Safari to Respect Border Radius on Images & Videos

Force Safari to Respect Border Radius on Images & Videos

Safari will often not respect border radiuses on images and videos. With this CSS code snippet you can force Safari to respect border radius on images and videos on your Webflow site.

Add Random Sticker to Page on Click

Add Random Sticker to Page on Click

A fun unique way of adding a random sticker to your Webflow site on click.

DRAG
Real-time sorting by
Hide/show Items based on URL Parameter

Hide/show Items based on URL Parameter

Show or hide divs or elements based on the parameter within a URL in Webflow. This Javascript code allows you to make your Webflow site even more dynamic by allowing you to customize elements on the page based on the URL parameter provided.

Reload Page after Form Submit

Reload Page after Form Submit

Automatically refresh your Webflow site's page after a form submit with this Javascript snippet. A great way of indicating that a form has been submitted to a user or refreshing the page for another submission.

Count Up Numbers on Page Scroll

Count Up Numbers on Page Scroll

When scrolling down the page numbers count up as they enter browser view via this Javascript snippet on your Webflow site. An easy way to add number count up to your Webflow site.

SVG Clip-path for Custom Image Cropping

SVG Clip-path for Custom Image Cropping

Create a responsive clip path for images using SVG shapes in Webflow.This allows you to create unique shaped images using SVG paths rather than DIVs or similar methods.

Prevent Input Zoom Scaling on Mobile

Prevent Input Zoom Scaling on Mobile

Prevent an input form zoom scaling on mobile on your Webflow site. This allows for a better user experience based on your sites design rather than mobile OS zoom default properties.

International Flags Phone Number Input

International Flags Phone Number Input

Add international flags to a phone number for input in Webflow. Adding this allows for a unique way of adding international flags to a phone form field in your Webflow site.

Infinite CSS Marquee/Ticker Logo

Infinite CSS Marquee/Ticker Logo

An easy way to utilize CSS for Logo marquees and other sections in your Webflow site. An easier way to create an infinite looping marquee on your Webflow site than creating them manually with Webflow interactions.

Truncate multi-line text with Ellipse

Truncate multi-line text with Ellipse

Do you want consistency with your Webflow designs? Truncate multi-line texts with ellipses based on 2 or 3 lines of your choosing via CSS. This helps keep your designs uniformed without needing to set max height limitations by truncating text that goes beyond a certain length.

DRAG
Real-time sorting by