shape-mpertyesi
shape-margin özelliği, shape-outside özelliği ile tanımlanan şeklin etrafında bir boşluk belirler.
Bu, şekil ile onu saran metin arasındaki mesafeyi artırmayı sağlar.
Sözdizimi
seçici {
shape-margin: değer;
}
Örnek
20px boşluklu bir daire:
<div class="shape"></div>
<p>
some long text
</p>
.shape {
width: 150px;
height: 150px;
float: left;
shape-outside: circle(50%);
shape-margin: 10px;
clip-path: circle(50%);
background: #3498db;
}
p {
width: 500px;
text-align: justify;
}
:
Örnek
1em boşluklu bir üçgen:
<div class="shape"></div>
<p>
some long text
</p>
.shape {
width: 150px;
height: 150px;
float: left;
shape-outside: polygon(0% 0%, 100% 50%, 0% 100%);
shape-margin: 1em;
clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
background: #e74c3c;
}
p {
width: 500px;
text-align: justify;
}
:
Ayrıca Bakınız
-
Akış şeklini tanımlayan
shape-outsideözelliği -
Öğenin görünür şeklini oluşturan
clip-pathözelliği -
shape-margin'in çalışması için gerekli olan
floatözelliği