in English

ਖਿੱਚਿਆ ਲਿੰਕ

CSS ਦੁਆਰਾ ਇੱਕ ਨੇਸਟਡ ਲਿੰਕ ਨੂੰ "ਖਿੱਚ ਕੇ" ਕਿਸੇ ਵੀ HTML ਤੱਤ ਜਾਂ ਬੂਟਸਟਰੈਪ ਕੰਪੋਨੈਂਟ ਨੂੰ ਕਲਿੱਕ ਕਰਨ ਯੋਗ ਬਣਾਓ।

ਇੱਕ ਸੂਡੋ ਐਲੀਮੈਂਟ ਦੁਆਰਾ ਇਸਦੇ ਸ਼ਾਮਿਲ ਬਲਾਕ ਨੂੰ ਕਲਿਕ ਕਰਨ ਯੋਗ ਬਣਾਉਣ ਲਈ.stretched-link ਇੱਕ ਲਿੰਕ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ। ਜ਼ਿਆਦਾਤਰ ਮਾਮਲਿਆਂ ਵਿੱਚ, ਇਸਦਾ ਮਤਲਬ ਹੈ ਕਿ ਇੱਕ ਐਲੀਮੈਂਟ ਜਿਸ ਵਿੱਚ ਕਲਾਸ ਦੇ ਨਾਲ ਇੱਕ ਲਿੰਕ ਹੁੰਦਾ ਹੈ, ਕਲਿੱਕ ਕਰਨ ਯੋਗ ਹੁੰਦਾ ਹੈ।::afterposition: relative;.stretched-link

ਕਾਰਡਾਂ ਵਿੱਚ position: relativeਮੂਲ ਰੂਪ ਵਿੱਚ ਬੂਟਸਟਰੈਪ ਹੁੰਦੇ ਹਨ, ਇਸਲਈ ਇਸ ਸਥਿਤੀ ਵਿੱਚ ਤੁਸੀਂ .stretched-linkਬਿਨਾਂ ਕਿਸੇ ਹੋਰ HTML ਤਬਦੀਲੀਆਂ ਦੇ ਕਾਰਡ ਵਿੱਚ ਇੱਕ ਲਿੰਕ ਵਿੱਚ ਕਲਾਸ ਨੂੰ ਸੁਰੱਖਿਅਤ ਰੂਪ ਨਾਲ ਜੋੜ ਸਕਦੇ ਹੋ।

ਖਿੱਚੇ ਗਏ ਲਿੰਕਾਂ ਦੇ ਨਾਲ ਮਲਟੀਪਲ ਲਿੰਕ ਅਤੇ ਟੈਪ ਟੀਚਿਆਂ ਦੀ ਸਿਫ਼ਾਰਸ਼ ਨਹੀਂ ਕੀਤੀ ਜਾਂਦੀ। ਹਾਲਾਂਕਿ, ਕੁਝ positionਅਤੇ z-indexਸ਼ੈਲੀਆਂ ਇਸਦੀ ਲੋੜ ਪੈਣ 'ਤੇ ਮਦਦ ਕਰ ਸਕਦੀਆਂ ਹਨ।

Card image cap
ਖਿੱਚਿਆ ਲਿੰਕ ਵਾਲਾ ਕਾਰਡ

ਕਾਰਡ ਦੇ ਸਿਰਲੇਖ 'ਤੇ ਬਣਾਉਣ ਅਤੇ ਕਾਰਡ ਦੀ ਸਮਗਰੀ ਦਾ ਵੱਡਾ ਹਿੱਸਾ ਬਣਾਉਣ ਲਈ ਕੁਝ ਤੇਜ਼ ਉਦਾਹਰਨ ਟੈਕਸਟ।

ਕਿਤੇ ਜਾਓ
<div class="card" style="width: 18rem;">
  <img src="..." class="card-img-top" alt="...">
  <div class="card-body">
    <h5 class="card-title">Card with stretched link</h5>
    <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
    <a href="#" class="btn btn-primary stretched-link">Go somewhere</a>
  </div>
</div>

ਮੀਡੀਆ ਆਬਜੈਕਟ position: relativeਡਿਫੌਲਟ ਰੂਪ ਵਿੱਚ ਨਹੀਂ ਹੁੰਦੇ ਹਨ, ਇਸਲਈ ਸਾਨੂੰ .position-relativeਲਿੰਕ ਨੂੰ ਮੀਡੀਆ ਆਬਜੈਕਟ ਦੇ ਬਾਹਰ ਫੈਲਣ ਤੋਂ ਰੋਕਣ ਲਈ ਇੱਥੇ ਜੋੜਨ ਦੀ ਲੋੜ ਹੈ।

Generic placeholder image
ਖਿੱਚਿਆ ਲਿੰਕ ਵਾਲਾ ਮੀਡੀਆ

ਕ੍ਰਾਸ ਬੈਠ ਅਮੇਤ ਨਿਭ ਲਿਬੇਰੋ, ਗਰਵਿਡਾ ਨੱਲਾ ਵਿੱਚ। ਨੱਲਾ ਵੈਲ ਮੇਟਸ ਸਕਲੇਰੀਸਕ ਐਂਟੀ ਸੋਲੀਸੀਟੂਡਿਨ। ਕ੍ਰਾਸ ਪਰਸ ਓਡੀਓ, ਵੈਸਟੀਬੁਲਮ ਇਨ ਵੁਲਪੁਟੇਟ ਐਟ, ਟੈਂਪਸ ਵਿਵੇਰਾ ਟਰਪੀਸ। Fusce condimentum nunc ac nisi vulputate fringilla. ਫੌਸੀਬਸ ਵਿੱਚ ਡੋਨੇਕ ਲੈਸੀਨੀਆ ਕੋਂਗੂ ਫੈਲਿਸ।

ਕਿਤੇ ਜਾਓ
<div class="media position-relative">
  <img src="..." class="mr-3" alt="...">
  <div class="media-body">
    <h5 class="mt-0">Media with stretched link</h5>
    <p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>
    <a href="#" class="stretched-link">Go somewhere</a>
  </div>
</div>

ਕਾਲਮ position: relativeਮੂਲ ਰੂਪ ਵਿੱਚ ਹੁੰਦੇ ਹਨ, ਇਸਲਈ ਕਲਿੱਕ ਕਰਨ ਯੋਗ ਕਾਲਮਾਂ ਨੂੰ ਸਿਰਫ਼ .stretched-linkਇੱਕ ਲਿੰਕ 'ਤੇ ਕਲਾਸ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ। ਹਾਲਾਂਕਿ, ਇੱਕ ਲਿੰਕ ਨੂੰ ਪੂਰੇ ਉੱਤੇ ਖਿੱਚਣ ਲਈ ਕਾਲਮ ਅਤੇ ਕਤਾਰ 'ਤੇ .rowਲੋੜ ਹੁੰਦੀ ਹੈ।.position-static.position-relative

Generic placeholder image
ਖਿੱਚੇ ਹੋਏ ਲਿੰਕ ਦੇ ਨਾਲ ਕਾਲਮ

ਕ੍ਰਾਸ ਬੈਠ ਅਮੇਤ ਨਿਭ ਲਿਬੇਰੋ, ਗਰਵਿਡਾ ਨੱਲਾ ਵਿੱਚ। ਨੱਲਾ ਵੈਲ ਮੇਟਸ ਸਕਲੇਰੀਸਕ ਐਂਟੀ ਸੋਲੀਸੀਟੂਡਿਨ। ਕ੍ਰਾਸ ਪਰਸ ਓਡੀਓ, ਵੈਸਟੀਬੁਲਮ ਇਨ ਵੁਲਪੁਟੇਟ ਐਟ, ਟੈਂਪਸ ਵਿਵੇਰਾ ਟਰਪੀਸ। Fusce condimentum nunc ac nisi vulputate fringilla. ਫੌਸੀਬਸ ਵਿੱਚ ਡੋਨੇਕ ਲੈਸੀਨੀਆ ਕੋਂਗੂ ਫੈਲਿਸ।

ਕਿਤੇ ਜਾਓ
<div class="row no-gutters bg-light position-relative">
  <div class="col-md-6 mb-md-0 p-md-4">
    <img src="..." class="w-100" alt="...">
  </div>
  <div class="col-md-6 position-static p-4 pl-md-0">
    <h5 class="mt-0">Columns with stretched link</h5>
    <p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>
    <a href="#" class="stretched-link">Go somewhere</a>
  </div>
</div>

ਰੱਖਣ ਵਾਲੇ ਬਲਾਕ ਦੀ ਪਛਾਣ ਕਰਨਾ

ਜੇਕਰ ਖਿੱਚਿਆ ਹੋਇਆ ਲਿੰਕ ਕੰਮ ਨਹੀਂ ਕਰਦਾ ਜਾਪਦਾ ਹੈ, ਤਾਂ ਸੰਭਾਵਿਤ ਬਲਾਕ ਇਸ ਦਾ ਕਾਰਨ ਹੋਵੇਗਾ। ਹੇਠ ਲਿਖੀਆਂ CSS ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਇੱਕ ਤੱਤ ਵਾਲੇ ਬਲਾਕ ਨੂੰ ਬਣਾ ਦੇਣਗੀਆਂ:

  • ਤੋਂ ਇਲਾਵਾ ਇੱਕ positionਮੁੱਲstatic
  • A transformਜਾਂ ਇਸ perspectiveਤੋਂ ਇਲਾਵਾ ਹੋਰ ਮੁੱਲnone
  • ਜਾਂ ਦਾ will-changeਮੁੱਲtransformperspective
  • filterਇਸ ਤੋਂ ਇਲਾਵਾ ਇੱਕ ਮੁੱਲ noneਜਾਂ ਇੱਕ will-changeਮੁੱਲ filter(ਸਿਰਫ਼ ਫਾਇਰਫਾਕਸ 'ਤੇ ਕੰਮ ਕਰਦਾ ਹੈ)
Card image cap
ਖਿੱਚੇ ਹੋਏ ਲਿੰਕਾਂ ਵਾਲਾ ਕਾਰਡ

ਕਾਰਡ ਦੇ ਸਿਰਲੇਖ 'ਤੇ ਬਣਾਉਣ ਅਤੇ ਕਾਰਡ ਦੀ ਸਮਗਰੀ ਦਾ ਵੱਡਾ ਹਿੱਸਾ ਬਣਾਉਣ ਲਈ ਕੁਝ ਤੇਜ਼ ਉਦਾਹਰਨ ਟੈਕਸਟ।

ਖਿੱਚਿਆ ਲਿੰਕ ਇੱਥੇ ਕੰਮ ਨਹੀਂ ਕਰੇਗਾ, ਕਿਉਂਕਿ position: relativeਲਿੰਕ ਵਿੱਚ ਜੋੜਿਆ ਗਿਆ ਹੈ

ਇਹ ਖਿੱਚਿਆ ਹੋਇਆ ਲਿੰਕ ਸਿਰਫ p-ਟੈਗ 'ਤੇ ਫੈਲਿਆ ਹੋਵੇਗਾ, ਕਿਉਂਕਿ ਇਸ 'ਤੇ ਇੱਕ ਟ੍ਰਾਂਸਫਾਰਮ ਲਾਗੂ ਕੀਤਾ ਗਿਆ ਹੈ।

<div class="card" style="width: 18rem;">
  <img src="..." class="card-img-top" alt="...">
  <div class="card-body">
    <h5 class="card-title">Card with stretched links</h5>
    <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
    <p class="card-text">
      <a href="#" class="stretched-link text-danger" style="position: relative;">Stretched link will not work here, because <code>position: relative</code> is added to the link</a>
    </p>
    <p class="card-text bg-light" style="transform: rotate(0);">
      This <a href="#" class="text-warning stretched-link">stretched link</a> will only be spread over the <code>p</code>-tag, because a transform is applied to it.
    </p>
  </div>
</div>