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?
Asked
Active
Viewed 276 times
3
-
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 Answers
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
-
Except it should be part of the text over blue background to be red and part of the text over red background to be blue. – Meraj al Maksud Jul 28 '19 at 05:08
-
1The code can be manipulated to fit the background. It's just a basic concept of what they may be looking for. – darkhouse Jul 28 '19 at 05:10
-