shape-margin ဂုဏ်သတ္တိ

shape-margin ဂုဏ်သတ္တိသည် shape-outside ဂုဏ်သတ္တိဖြင့် သတ်မှတ်ထားသော ပုံသဏ္ဌာန်ကို ဝန်းရံသည့် အကွာအဝေးကို သတ်မှတ်ပေးပါသည်။ ၎င်းသည် ပုံသဏ္ဌာန်နှင့် ယင်းကို ဝန်းရံနေသော စာသားကြားရှိ အကွာအဝေးကို တိုးမြှင့်ပေးနိုင်ပါသည်။

ဝါကျဖွဲ့စည်းပုံ

cssရွေးချယ်သူ {
  shape-margin: တန်ဖိုး;
}

ဥပမာ

20px အကွာအဝေးရှိသော စက်ဝိုင်း -

html<div class="shape"></div>
<p>
  some long text
</p>
css.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;
}

Результат:

ဥပမာ

1em အကွာအဝေးရှိသော တြိဂံ -

html<div class="shape"></div>
<p>
  some long text
</p>
css.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;
}

Результат:

ဤအကြောင်းကိုလည်း ကြည့်ပါ

  • shape-outside ဂုဏ်သတ္တိ,
    အဝန်းပတ်ခြင်းအတွက် ပုံသဏ္ဌာန်ကို သတ်မှတ်ပေးသည်
  • clip-path ဂုဏ်သတ္တိ,
    အစိတ်အပိုင်း၏ မြင်နိုင်သော ပုံသဏ္ဌာန်ကို ဖန်တီးပေးသည်
  • float ဂုဏ်သတ္တိ,
    shape-margin လုပ်ဆောင်ရန် လိုအပ်သည်