in English

ਏਮਬੈਡਸ

ਕਿਸੇ ਵੀ ਡਿਵਾਈਸ 'ਤੇ ਸਕੇਲ ਕਰਨ ਵਾਲਾ ਅੰਦਰੂਨੀ ਅਨੁਪਾਤ ਬਣਾ ਕੇ ਮਾਤਾ-ਪਿਤਾ ਦੀ ਚੌੜਾਈ ਦੇ ਆਧਾਰ 'ਤੇ ਜਵਾਬਦੇਹ ਵੀਡੀਓ ਜਾਂ ਸਲਾਈਡਸ਼ੋ ਏਮਬੇਡ ਬਣਾਓ।

ਬਾਰੇ

ਨਿਯਮ ਸਿੱਧੇ ਤੌਰ 'ਤੇ <iframe>, <embed>, <video>, ਅਤੇ <object>ਤੱਤਾਂ 'ਤੇ ਲਾਗੂ ਹੁੰਦੇ ਹਨ; .embed-responsive-itemਜਦੋਂ ਤੁਸੀਂ ਹੋਰ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਲਈ ਸਟਾਈਲਿੰਗ ਨਾਲ ਮੇਲ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ ਤਾਂ ਵਿਕਲਪਿਕ ਤੌਰ 'ਤੇ ਇੱਕ ਸਪਸ਼ਟ ਉੱਤਰੀ ਸ਼੍ਰੇਣੀ ਦੀ ਵਰਤੋਂ ਕਰੋ ।

ਪ੍ਰੋ-ਟਿਪ! frameborder="0"ਤੁਹਾਨੂੰ ਤੁਹਾਡੇ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰਨ ਦੀ ਲੋੜ ਨਹੀਂ ਹੈ <iframe>ਕਿਉਂਕਿ ਅਸੀਂ ਤੁਹਾਡੇ ਲਈ ਇਸਨੂੰ ਓਵਰਰਾਈਡ ਕਰਦੇ ਹਾਂ।

ਉਦਾਹਰਨ

ਕਿਸੇ ਵੀ ਏਮਬੇਡ ਜਿਵੇਂ ਕਿ ਇੱਕ <iframe>ਪੈਰੇਂਟ ਐਲੀਮੈਂਟ ਵਿੱਚ .embed-responsiveਅਤੇ ਇੱਕ ਆਕਾਰ ਅਨੁਪਾਤ ਨਾਲ ਸਮੇਟਣਾ। ਇਸਦੀ .embed-responsive-itemਸਖਤੀ ਨਾਲ ਲੋੜ ਨਹੀਂ ਹੈ, ਪਰ ਅਸੀਂ ਇਸਨੂੰ ਉਤਸ਼ਾਹਿਤ ਕਰਦੇ ਹਾਂ।

<div class="embed-responsive embed-responsive-16by9">
  <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/zpOULjyy-n8?rel=0" allowfullscreen></iframe>
</div>

ਆਕਾਰ ਅਨੁਪਾਤ

ਆਕਾਰ ਅਨੁਪਾਤ ਨੂੰ ਸੋਧਕ ਕਲਾਸਾਂ ਨਾਲ ਅਨੁਕੂਲਿਤ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ। ਮੂਲ ਰੂਪ ਵਿੱਚ ਹੇਠ ਲਿਖੀਆਂ ਅਨੁਪਾਤ ਸ਼੍ਰੇਣੀਆਂ ਪ੍ਰਦਾਨ ਕੀਤੀਆਂ ਜਾਂਦੀਆਂ ਹਨ:

<!-- 21:9 aspect ratio -->
<div class="embed-responsive embed-responsive-21by9">
  <iframe class="embed-responsive-item" src="..."></iframe>
</div>

<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
  <iframe class="embed-responsive-item" src="..."></iframe>
</div>

<!-- 4:3 aspect ratio -->
<div class="embed-responsive embed-responsive-4by3">
  <iframe class="embed-responsive-item" src="..."></iframe>
</div>

<!-- 1:1 aspect ratio -->
<div class="embed-responsive embed-responsive-1by1">
  <iframe class="embed-responsive-item" src="..."></iframe>
</div>

ਦੇ ਅੰਦਰ _variables.scss, ਤੁਸੀਂ ਉਹਨਾਂ ਪੱਖ ਅਨੁਪਾਤ ਨੂੰ ਬਦਲ ਸਕਦੇ ਹੋ ਜੋ ਤੁਸੀਂ ਵਰਤਣਾ ਚਾਹੁੰਦੇ ਹੋ। ਇੱਥੇ $embed-responsive-aspect-ratiosਸੂਚੀ ਦੀ ਇੱਕ ਉਦਾਹਰਨ ਹੈ:

$embed-responsive-aspect-ratios: (
  (21 9),
  (16 9),
  (4 3),
  (1 1)
) !default;