အဓိကအကြောင်းအရာသို့ ကျော်သွားပါ။ စာရွက်စာတမ်းလမ်းညွှန်မှုသို့ ကျော်သွားပါ။
in English

ဆန့်ခ်

HTML ဒြပ်စင် သို့မဟုတ် Bootstrap အစိတ်အပိုင်းကို CSS မှတစ်ဆင့် "ဆန့်ထုတ်ခြင်း" ဖြင့် ချိတ်ဆက်နိုင်သော လင့်ခ်တစ်ခုကို ကလစ်လုပ်နိုင်သည်။

ဘလောက်ပါရှိသော ၎င်း၏ pseudo ဒြပ်စင် မှတစ်ဆင့် ကလစ်နှိပ်နိုင် .stretched-linkစေရန် လင့်ခ်တစ်ခုသို့ ပေါင်းထည့်ပါ ။ အခြေအနေအများစုတွင်၊ အတန်း နှင့်လင့်ခ်ပါရှိသော ဒြပ်စင်တစ်ခုအား ကလစ်နှိပ်နိုင်သည်ဟု ဆိုလိုသည်။ CSS အလုပ်လုပ် ပုံ အား ကျေးဇူးပြု၍ မှတ်သားထားပါ ၊ ဇယားဒြပ်စင်အများစုနှင့် ရောနှော၍မရပါ။::afterposition: relative;.stretched-linkposition.stretched-link

ကတ်များ position: relativeသည် Bootstrap တွင် မူရင်းအတိုင်းရှိသည်၊ ထို့ကြောင့် ဤကိစ္စတွင် သင်သည် .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
ဆွဲဆန့်ထားသောလင့်ခ်ဖြင့် စိတ်ကြိုက်အစိတ်အပိုင်း

ဤအရာသည် စိတ်ကြိုက်အစိတ်အပိုင်းအတွက် နေရာယူထားသည့် အကြောင်းအရာအချို့ဖြစ်သည်။ ၎င်းသည် လက်တွေ့ကမ္ဘာရှိ အကြောင်းအရာအချို့၏ ပုံစံကို အတုယူရန် ရည်ရွယ်ထားပြီး အစိတ်အပိုင်း၏ ကိုယ်ထည်နှင့် အရွယ်အစား အနည်းငယ်ကိုပေးရန် ဤနေရာတွင် ကျွန်ုပ်တို့ အသုံးပြုနေပါသည်။

တစ်နေရာရာသွားပါ။
<div class="d-flex position-relative">
  <img src="..." class="flex-shrink-0 me-3" alt="...">
  <div>
    <h5 class="mt-0">Custom component with stretched link</h5>
    <p>This is some placeholder content for the custom component. It is intended to mimic what some real-world content would look like, and we're using it here to give the component a bit of body and size.</p>
    <a href="#" class="stretched-link">Go somewhere</a>
  </div>
</div>
Generic placeholder image
ဆွဲဆန့်ထားသော ကော်လံများ

ဤအခြားစိတ်ကြိုက်အစိတ်အပိုင်းအတွက် နေရာယူသူအကြောင်းအရာ၏ နောက်ထပ်ဥပမာ။ ၎င်းသည် လက်တွေ့ကမ္ဘာရှိ အကြောင်းအရာအချို့၏ ပုံစံကို အတုယူရန် ရည်ရွယ်ထားပြီး အစိတ်အပိုင်း၏ ကိုယ်ထည်နှင့် အရွယ်အစား အနည်းငယ်ကိုပေးရန် ဤနေရာတွင် ကျွန်ုပ်တို့ အသုံးပြုနေပါသည်။

တစ်နေရာရာသွားပါ။
<div class="row g-0 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 p-4 ps-md-0">
    <h5 class="mt-0">Columns with stretched link</h5>
    <p>Another instance of placeholder content for this other custom component. It is intended to mimic what some real-world content would look like, and we're using it here to give the component a bit of body and size.</p>
    <a href="#" class="stretched-link">Go somewhere</a>
  </div>
</div>

ပါဝင်သော ဘလောက်ကို ဖော်ထုတ်ခြင်း။

ဖြန့်ထားသောလင့်ခ်သည် အလုပ်မလုပ်ပါက၊ ပါဝင်သော ဘလောက် သည် အကြောင်းရင်းဖြစ်နိုင်သည်။ အောက်ဖော်ပြပါ CSS ဂုဏ်သတ္တိများသည် ဒြပ်စင်တစ်ခုကို ပါ၀င်သည့် ပိတ်ဆို့ခြင်းဖြစ်စေလိမ့်မည်-

  • positionအခြားတန်ဖိုး တစ်ခုstatic
  • A transformသို့မဟုတ် perspectiveအခြားတန်ဖိုးnone
  • သို့မဟုတ် will-changeတန်ဖိုး တစ်ခုtransformperspective
  • သို့မဟုတ် တန်ဖိုး filterမဟုတ်သော အခြားတန်ဖိုး ( Firefox တွင်သာ အလုပ်လုပ်သည်)nonewill-changefilter
Card image cap
အချိတ်အဆက်များပါသောကတ်

ကတ်ခေါင်းစဉ်ပေါ်တွင် တည်ဆောက်ရန်နှင့် ကတ်၏အကြောင်းအရာအများစုကို ဖန်တီးရန် အမြန်ဥပမာစာသားအချို့။

position: relativeလင့်ခ် ကို ထည့်ထားသော ကြောင့် ဆန့်ထုတ်ထားသောလင့်ခ်သည် ဤနေရာတွင် အလုပ်မဖြစ်ပါ။

အသွင်ပြောင်းမှုကို ၎င်းနှင့်သက်ဆိုင်သောကြောင့် ဤ ဆွဲဆန့်ထားသောလင့်ခ် သည် -tag ပေါ်တွင်သာ ပျံ့နှံ့သွားမည် ဖြစ်သည်။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>