<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<style type="text/css">
body{display:block;padding:0px;margin:0px;position:relative;width:100%;min-height:100%;}
.main-frame-overlay{
position:relative;
width:30vw;
height:20vh;
background: gray;
margin:20vh auto;
}
.main-frame-overlay::before {
content: attr(data-content);
background: black;
width: 100%;
position: absolute;
width: 20%;
height: -10%;
top: -9%;
left: 0px;
color: white;
text-align: center;
margin-left: 60%;
}
.main-frame{
position:relative;
}
.triangle{
position:absolute;
width: 0px;
height: 0px;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 20px solid #24375B;
margin-left:68.5%;
}
</style>
<div class="main-frame-overlay" data-content="1234">
<div class="triangle"></div>
<div class="main-frame">
ваш текст
</div>
</div>
</body>
</html>