Padding for two-lined headline

前端 未结 5 1689
陌清茗
陌清茗 2021-01-24 09:22

That is a little bit hard to explain, if someone knows a better title for this, please go ahead and change it.

I want to draw a black box behind my headline. I\'m doing

5条回答
  •  日久生厌
    2021-01-24 10:03

    I recently found another sollution. It works in almost every browser (No IE8 and down), is easily adjustable and looks like this:

    HTML

    Du texte HTML dynamique sur plusieurs lignes avec un fond qui suit bien et des marges autour.

    CSS

    h1 {
        color:#fff;
    }
    
    .wrap {
        box-shadow: -10px 0 0 10px #000, 10px 0 0 10px #000;
    }
    
    .inner {
        background: #000;
        position:relative;
    }
    

提交回复
热议问题