Shopify themes, liquid, logos, and UX
I was curious to see if there was a way to change the heading color for the "Image with text" section. My website url is: The Tiny Greenhouse
I would like to change the color for each letter for the word "color" to something like this:
Hi @aosttg
in this case
You can try follow this path:
Themes => edit code => asset => base.css
and add this code to bottom of the file base.css
.banner__heading{
background-image: linear-gradient(to left, violet, indigo, green, blue, yellow, orange, red);
-webkit-background-clip: text;
-moz-background-clip: text;
background-clip: text;
color: transparent;
}
Hi @aosttg,
You may try out this method as well:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
var colorText = '<span >c</span><span style="color:green";>o</span><span style="color:blue";>l</span><span style="color:pink";>o</span><span style="color:yellow";>r</span>';
var textColor = $('.image-with-text__heading.h2:not(.added-color)').html()
textColor = textColor.replaceAll('color', colorText);
$('.image-with-text__heading.h2').html(textColor)
$('.image-with-text__heading.h2').addClass('added-color')
</script>
Sincerely,
Layoutbase - Drag & drop page builder tool
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024