2.1 KiB
2.1 KiB
id | title | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
587d78ab367417b2b2512af2 | Use the flex-direction Property to Make a Row | 0 | استخدم خاصية الاتجاه المرن لإجراء صف |
Description
display: flex
لعنصر يحولها إلى حاوية مرنة. هذا يجعل من الممكن محاذاة أي أطفال من هذا العنصر إلى صفوف أو أعمدة. يمكنك القيام بذلك عن طريق إضافة الخاصية flex-direction
إلى العنصر الأصل وتعيينه إلى الصف أو العمود. يؤدي إنشاء صف إلى محاذاة الأطفال أفقيًا ، وسيؤدي إنشاء عمود إلى محاذاة الأطفال رأسيًا. الخيارات الأخرى flex-direction
هي عكس الصفوف وعكس الأعمدة. ملحوظة القيمة الافتراضية لخاصية
flex-direction
هي صف. Instructions
flex-direction
لعنصر #box-container
، وأعطها قيمة عكس صف. Tests
tests:
- text: 'يجب أن <code>#box-container</code> عنصر <code>#box-container</code> خاصية <code>flex-direction</code> مضبوطة على عكس الصف.'
testString: 'assert($("#box-container").css("flex-direction") == "row-reverse", "The <code>#box-container</code> element should have a <code>flex-direction</code> property set to row-reverse.");'
Challenge Seed
<style>
#box-container {
display: flex;
height: 500px;
}
#box-1 {
background-color: dodgerblue;
width: 50%;
height: 50%;
}
#box-2 {
background-color: orangered;
width: 50%;
height: 50%;
}
</style>
<div id="box-container">
<div id="box-1"></div>
<div id="box-2"></div>
</div>
Solution
// solution required