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 වැඩ කිරීමට අවශ්‍ය