3

I have a problem with changing color of one part of text on my website. I have background picture which has both red and blue color in it and I want to write down a title which will be red colored on blue part of the background and blue colored on red part of the background. How can I do it?

Meraj al Maksud
  • 1,528
  • 2
  • 22
  • 36
jorganinho
  • 51
  • 11
  • I'm not sure if I get you but you have 2 different background images: 1 is red colored and 1 is blue colored. You want to create two different pages where you use the 1st background image (red) in the first page with blue-colored text and then you use the 2nd background image (blue) in the second page with red-colored text? – Jude Maranga Jul 28 '19 at 04:42
  • Assuming your background image will move around a bit, and so will the text rendering due to fonts and such, I think you should utilize SVG for this. – Brad Jul 28 '19 at 04:47

1 Answers1

1

You might want something like this.

.red{
  color: red;
}
.blue{
  color: blue;
}
<html>
  <body>
     <span class="blue">Blue letters</span> <span class="red">Red letters</span>
  </body>
</html>
darkhouse
  • 205
  • 5
  • 15