/ Published in: CSS
Texthintergrund farblich auf Linienbasis
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
HTML: <div> <h4> <span> <span>» Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. «</span> </span> </h4> </div> CSS: div { margin:20px 50px 20px 20px; } h4, span { position: relative; display: inline; color: white; background-color: #6481a9; font:normal 14px/178% Arial, Helvetica, sans-serif; padding: 4px 0; } h4 > span { left: 20px; } span { right: 10px; }
URL: http://jsfiddle.net/andreasisaak/PS8dX/