Здравствуйте. Подскажите, пожалуйста, как сделать такую форму в CSS?
Ответы (3 шт):
Автор решения: Антон Иванов
→ Ссылка
div {
padding: 20px;
border-radius: 60% 10px 30% 10px;
background-color: gray;
width:140px;
}
img {
border-radius: 60% 10px 30% 10px;
margin-left: 10px;
}
<div>
<img src='...' alt=''>
</div>
поиграйтесь с margin и padding и углами закругления и получите любую форму.
Автор решения: Pilaton
→ Ссылка
div {
width: 150px;
height: 150px;
background: #ff355c;
display: flex;
align-items: center;
justify-content: center;
font-size: 50px;
color: #fff;
border-radius: 75% 10% 35% 15%;
}
<div> :) </div>
Автор решения: darinka poznyak
→ Ссылка
Вот так это можно реализовать:
.container {
width: 570px;
height: 470px;
position: relative;
}
.block {
width: 547px;
height: 450px;
background: gray;
border-radius: 320px 50px 200px 80px;
position: absolute;
box-shadow: 10px 10px 2px black;
}
.block2 {
width: 350px;
height: 250px;
background-image: url("https://avatars.mds.yandex.net/i?id=198e9027494b11d7e056aa0703be9660aec82857-12499725-images-thumbs&n=13");
background-position: center;
background-size: 100%;
background-repeat: no-repeat;
position: absolute;
left: 100px;
top: 100px;
border-radius: 150px 10px 80px 10px;
z-index: 1;
}
<div class="container">
<div class="block">
<div class="block2"></div>
</div>
</div>
