How can I create a transparent font with stroke in Webflow using custom code?

Published on
September 22, 2023

To create a transparent font with a stroke in Webflow using custom code, you can follow these steps:

  1. Create a new project in Webflow or open an existing one.

  2. Navigate to the Designer tab and select the element where you want to apply the transparent font with a stroke.

  3. Double-click on the element to edit its contents. This could be a heading, paragraph, or any other text element.

  4. Once you are in the text editor, select the text where you want to apply the transparent font with a stroke.

  5. Open the "Typography" panel by clicking on the paintbrush icon on the right side of the editor.

  6. In the typography panel, click on the "Custom Code" button at the bottom.

  7. In the custom code section, add the following CSS code to create the transparent font with a stroke:

.selector-class {  -webkit-text-stroke: 1px #000;  -webkit-text-fill-color: transparent;}

Make sure to replace .selector-class with the actual class or ID of your element. You can change the pixel value and color code as per your preference.

  1. Close the custom code section and exit the text editor.

  2. Preview your site to see the transparent font with a stroke effect applied to the selected text.

Now you have successfully created a transparent font with a stroke in Webflow using custom code.

Additional Notes:

  • The code provided uses vendor-specific properties (-webkit-) to ensure compatibility across different browsers. You can add additional vendor-specific properties if needed.