Padding for two-lined headline

前端 未结 5 1687
陌清茗
陌清茗 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 09:55

    This is the closest I can get...really hacky, I think you'll need some JS myself :(

    This via:

    Some very, very long headline, that is very, very long.

    #Title { border-left: 20px solid #000; display:block; color: #fff; } #Title:after { content:''; display:inline-block; width: 20px; background: #000; } #Title span { background: #000; padding-right: 20px; direction: rtl; }

    http://jsfiddle.net/8EDPN/

提交回复
热议问题