Texthintergrund farblich auf Linienbasis HTML/CSS


/ Published in: CSS
Save to your folder(s)

Texthintergrund farblich auf Linienbasis


Copy this code and paste it in your HTML
  1. HTML:
  2. <div>
  3. <h4>
  4. <span>
  5. <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>
  6. </span>
  7. </h4>
  8. </div>
  9.  
  10. CSS:
  11. div {
  12. margin:20px 50px 20px 20px;
  13. }
  14.  
  15. h4, span {
  16. position: relative;
  17. display: inline;
  18. color: white;
  19. background-color: #6481a9;
  20. font:normal 14px/178% Arial, Helvetica, sans-serif;
  21. padding: 4px 0;
  22. }
  23.  
  24. h4 > span {
  25. left: 20px;
  26.  
  27. }
  28.  
  29. span {
  30. right: 10px;
  31. }

URL: http://jsfiddle.net/andreasisaak/PS8dX/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.