2.0 KiB
2.0 KiB
id | title | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
587d78ae367417b2b2512aff | Use the order Property to Rearrange Items | 0 | استخدم خاصية الطلب لإعادة ترتيب العناصر |
Description
order
لإخبار CSS بترتيب ظهور العناصر المرنة في الحاوية المرنة. بشكل افتراضي ، ستظهر العناصر بنفس الترتيب الوارد في مصدر HTML. يأخذ الخاصية الأرقام كقيم ، ويمكن استخدام الأرقام السالبة. Instructions
order
الخاصية CSS إلى كل من #box-1
و #box-2
. أعط #box-1
قيمة 2 وأعطي #box-2
قيمة 1. Tests
tests:
- text: 'يجب أن يحتوي عنصر <code>#box-1</code> على خاصية <code>order</code> تعيينها على قيمة 2.'
testString: 'assert($("#box-1").css("order") == "2", "The <code>#box-1</code> element should have the <code>order</code> property set to a value of 2.");'
- text: 'يجب أن يحتوي عنصر <code>#box-2</code> على خاصية <code>order</code> تعيينها إلى قيمة 1.'
testString: 'assert($("#box-2").css("order") == "1", "The <code>#box-2</code> element should have the <code>order</code> property set to a value of 1.");'
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