1

Is there any possibility to fill the text as the background for the div in css3 or css4?

div{
  background: 'some text' repeat;
}

enter image description here

Navin Rauniyar
  • 10,127
  • 14
  • 45
  • 68
  • 1
    Short answer: no. BUT you could fake it like this: http://stackoverflow.com/questions/1191464/is-there-a-way-to-use-use-text-as-the-background-with-css – Jonas Grumann Sep 08 '14 at 08:37

1 Answers1

3
body {
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='20px' width='70px'><text x='0' y='10' background-color='grey' fill='grey' font-size='10'>Some text</text></svg>");
}

There is no direct property, using SVG you can achive this.

refer here for fiddle

Raja Sekar
  • 2,062
  • 16
  • 23