Как сверстать такие уголки на чистом css, без использования svg?

Весь вопрос в заголовке. Я пробовал делать через border-radius, через псведоэлементы, но ничего не получается.

введите сюда описание изображения


Ответы (2 шт):

Автор решения: zhurof

Можно псевдами с использованием прозрачных границ

*,*:before,*:after{
  box-sizing: border-box;
}
body{
  background-color: #cda;
  margin: 0;
  padding: 10px;
}
.car-body{
  margin: 10px 0 80px;
  position: relative;
  width: 200px;
  height: 30px;
  background-color:#555;
}
.car-body:before,
.car-body:after{
  content: '';
  display:block;
  width: 100%;
  position:absolute;
  left:0;
}
.car-body:before{
  bottom: 100%;
  border-bottom: 10px solid #555;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
}
.car-body:after{
  top: 100%;
  border-top: 60px solid #555;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
}
<div class="car-body"></div>

Или подрезать используя clip-path

*,*:before,*:after{
  box-sizing: border-box;
}
body{
  background-color: #cda;
  margin: 0;
  padding: 10px;
}
.car-body{
  width: 200px;
  height: 100px;
  background-color:#555;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 40px, calc(100% - 50px) 100%, 50px 100%, 0 40px, 0 10px);
}
<div class="car-body"></div>

→ Ссылка
Автор решения: darinka poznyak

Такие уголки можно сверстать при помощи clip-path octagon:

<style>
.container {
width: 500px;
height: 600px;
border: 1px solid black;
position: relative;
margin: auto;
}
.octagon {
width: 400px;
height: 100px;
background: #3C3F42;
clip-path: polygon(
10% 0, 90% 0, 100% 30%, 100% 70%, 90% 100%, 10% 100%, 0% 70%, 0% 30%);
position: absolute;
bottom: 50px;
left: 50px;
}
.circle1 {
width: 100px;
height: 100px;
background: black;
border-radius: 50%;
position: absolute;
bottom: 0;
left: 60px;
}
.circle2 {
width: 100px;
height: 100px;
background: black;
border-radius: 50%;
position: absolute;
bottom: 0;
left: 200px;
}
.circle3 {
width: 100px;
height: 100px;
background: black;
border-radius: 50%;
position: absolute;
bottom: 0;
right: 60px;
}
.redblock {
width: 410px;
height: 110px;
background: red;
border-radius: 0 0 20px 20px;
position: absolute;
bottom: 130px;
left: 45px;
}
.line {
width: 420px;
height: 10px;
border-radius: 10px;
background: darkred;
position: absolute;
top: 350px;
left: 40px;
}
.grayblock {
width: 420px;
height: 100px;
background: lightgray;
border-radius: 40px 100px 0 0;
position: absolute;
top: 250px;
left: 40px;
}
.trap {
width: 100px;
height: 60px;
background: #3C3F42;
clip-path: polygon(20% 0%, 100% 1%, 100% 100%, 0% 100%);
position: absolute;
top: 190px;
left: 80px;
}
.grbl {
width: 60px;
height: 40px;
background: gray;
border-top: 5px solid black;
position: absolute;
top: 145px;
left: 110px;
border-radius: 5px 5px 0 0;
}
.line2 {
width: 2px;
height: 100px;
background: gray;
position: absolute;
left: 140px;
top: 45px;
}
.tr {
width: 0;
height: 0;
border-top: 25px solid transparent;
border-right: 50px solid red;
border-bottom: 25px solid transparent;
position: absolute;
left: 90px;
top: 45px;
}
</style>
<div class="container">
<div class="octagon"></div>
<div class="circle1"></div>
<div class="circle2"></div>
<div class="circle3"></div>
<div class="redblock"></div>
<div class="line"></div>
<div class="grayblock"></div>
<div class="trap"></div>
<div class="grbl"></div>
<div class="line2"></div>
<div class="tr"></div>
</div>

→ Ссылка