freeCodeCamp/curriculum/challenges/arabic/01-responsive-web-design/applied-visual-design/use-the-css-transform-scale...

1.8 KiB

id title challengeType videoUrl localeTitle
587d78a5367417b2b2512ad9 Use the CSS Transform scale Property to Change the Size of an Element 0 استخدم خاصية مقياس تحويل CSS لتغيير حجم عنصر

Description

لتغيير مقياس عنصر ما ، يحتوي CSS على خاصية transform ، إلى جانب الدالة scale() . مثال الكود التالي يضاعف حجم جميع عناصر الفقرة في الصفحة:
ص {
تحويل: مقياس (2)؛
}

Instructions

زيادة حجم العنصر مع معرف ball2 إلى 1.5 مرة حجمها الأصلي.

Tests

tests:
  - text: '<code>#ball2</code> خاصية <code>transform</code> لـ <code>#ball2</code> حجمها 1.5 مرة حجمها.'
    testString: 'assert(code.match(/#ball2\s*?{\s*?left:\s*?65%;\s*?transform:\s*?scale\(1\.5\);\s*?}|#ball2\s*?{\s*?transform:\s*?scale\(1\.5\);\s*?left:\s*?65%;\s*?}/gi), "Set the <code>transform</code> property for <code>#ball2</code> to scale it 1.5 times its size.");'

Challenge Seed

<style>
  .ball {
    width: 40px;
    height: 40px;
    margin: 50 auto;
    position: fixed;
    background: linear-gradient(
      35deg,
      #ccffff,
      #ffcccc
    );
    border-radius: 50%;
  }
  #ball1 {
    left: 20%;
  }
  #ball2 {
    left: 65%;

  }


</style>

<div class="ball" id= "ball1"></div>
<div class="ball" id= "ball2"></div>

Solution

// solution required