freeCodeCamp/curriculum/challenges/arabic/01-responsive-web-design/css-flexbox/use-the-align-self-property...

2.1 KiB

id title challengeType videoUrl localeTitle
587d78af367417b2b2512b00 Use the align-self Property 0 استخدم خاصية self-align

Description

الخاصية النهائية للعناصر المرنة هي align-self . تتيح لك هذه الخاصية ضبط محاذاة كل عنصر على حدة ، بدلاً من ضبطها كلها مرة واحدة. وهذا مفيد لأن تقنيات التعديل الشائعة الأخرى التي تستخدم خصائص CSS float و clear و vertical-align لا تعمل على العناصر المرنة. align-self يقبل نفس القيم كعناصر align-items وسيتجاوز أي قيمة تم تعيينها بواسطة الخاصية align-items .

Instructions

undefined

Tests

tests:
  - text: 'يجب أن يحتوي عنصر <code>#box-1</code> على خاصية <code>align-self</code> set to a value of center.'
    testString: 'assert($("#box-1").css("align-self") == "center", "The <code>#box-1</code> element should have the <code>align-self</code> property set to a value of center.");'
  - text: 'يجب أن يحتوي عنصر <code>#box-2</code> على الخاصية <code>align-self</code> set to a value of flex-end.'
    testString: 'assert($("#box-2").css("align-self") == "flex-end", "The <code>#box-2</code> element should have the <code>align-self</code> property set to a value of flex-end.");'

Challenge Seed

<style>
  #box-container {
    display: flex;
    height: 500px;
  }
  #box-1 {
    background-color: dodgerblue;

    height: 200px;
    width: 200px;
  }

  #box-2 {
    background-color: orangered;

    height: 200px;
    width: 200px;
  }
</style>

<div id="box-container">
  <div id="box-1"></div>
  <div id="box-2"></div>
</div>

Solution

// solution required