ဘာမှာ ပြုလုပ်တယ်
ပုံ အတွင်း ရေးသားမှု ပြုလုပ်တာ ဘာမှာ သင်တယ်
ပုံ အတွင်း ရေးသားမှု

Bottom Left
Top Left
Top Right
Bottom Right
Centered
ပုံ အတွင်း ရေးသားမှု ပြုလုပ်တယ်
ပထမ အစက် - စက်အသုံးပြု HTML:
<div class="container"> <img src="img_snow_wide.jpg" alt="Snow" style="width:100%;"> <div class="bottom-left">Bottom Left</div> <div class="top-left">Top Left</div> <div class="top-right">Top Right</div> <div class="bottom-right">Bottom Right</div> <div class="centered">Centered</div> </div>
ဒုတိယ အစက် - စက်အသုံးပြု CSS:
/* ယင်း ပုံ နှင့် ရေးသားမှု အပ်နှံ့အသား */ .container { position: relative; text-align: center; color: white; } /* အရှေ့အနား တောက်ကွေး ရေးသားမှု */ .bottom-left { position: absolute; bottom: 8px; left: 16px; } /* အရှေ့အထိပ် ရေးသားမှု */ .top-left { position: absolute; top: 8px; left: 16px; } /* အရှေ့အနား အထိပ် ရေးသားမှု */ .top-right { position: absolute; top: 8px; right: 16px; } /* အရှေ့အနား တောက်ကွေး ရေးသားမှု */ .bottom-right { position: absolute; bottom: 8px; right: 16px; } /* လုံးပါး ရေးသားမှု */ .centered { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
ကွန်ပျူတာ စာမျက်နှာ
教程:CSS 图像
教程:CSS 定位