This question has already been answered:

enter image description here

How can you impose such an element, in particular the lower band?

Reported as a duplicate by participants 0xdb , Air , aleksandr barakin , Jarvis_J , Dmitry Kozlov Nov 8, 'at 17:25 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • Look at the link, there is an answer, only in the opposite direction, by analogy, I think you will guess how - LFC

1 answer 1

something like this)

.block { position: relative; width: 218px; } .hover { position: absolute; top: 0; left: 0; height: 24px; color: #fff; background: rgba(0,0,0,0.5); width: 100%; z-index: 10; } .hover span { background: #FBD232; float: right; text-align: right; padding: 3px 5px; position: relative; color: #000; } .hover span:before { height: 0px; border-top: 12px solid transparent; border-right: 12px solid #FBD232; border-bottom: 12px solid transparent; content: ""; top: 0; left: -12px; position: absolute; width: 0; } 
 <div class="block"> <img src="https://i.stack.imgur.com/QxeKS.png" /> <div class="hover">Простые <span>от 800 Р</span></div> </div>