လုပ်နည်း - ကတ်များ
CSS ဖြင့် "ကတ်" ဖန်တီးနည်းကို လေ့လာပါ။
မောင်လှ
ဗိသုကာနှင့် အင်ဂျင်နီယာ
ဂျိန်းဒိုး
အတွင်းခန်းဒီဇိုင်နာ
ကတ်တစ်ခုဖန်တီးနည်း
အဆင့် 1) HTML ကိုထည့်ပါ
ဥပမာ
<div class="card">
<img src="img_avatar.png" alt="Avatar"
style="width:100%">
<div class="container">
<h4><b>John Doe</b></h4>
<p>Architect & Engineer</p>
</div>
</div>
အဆင့် 2) CSS ကိုထည့်ပါ
ဥပမာ
.card {
/* Add shadows to create the "card" effect */
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
transition: 0.3s;
}
/* On mouse-over, add a deeper shadow */
.card:hover {
box-shadow:
0 8px 16px 0 rgba(0,0,0,0.2);
}
/* Add some padding inside the card container */
.container {
padding: 2px 16px;
}
လုံးဝန်းသောထောင့်များဖြင့်
ဥပမာ
.card {
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
transition: 0.3s;
border-radius: 5px; /* 5px rounded corners */
}
/* Add rounded corners to the top left and the top right corner of the image */
img {
border-radius: 5px 5px 0 0;
}
အကြံပြုချက်- အရိပ်များအကြောင်း ပိုမိုလေ့လာရန် ကျွန်ုပ်တို့၏ CSS Shadow Effects Tutorial သို့ သွားပါ ။