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
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024