mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(avatar): adjust wide images to fill instead of squish
This commit is contained in:
@@ -11,4 +11,6 @@ ion-avatar {
|
||||
ion-avatar img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,13 @@
|
||||
</ion-avatar>
|
||||
<ion-label>Item Avatar</ion-label>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-avatar slot="end">
|
||||
<img src="https://images.unsplash.com/photo-1511125357779-27038c647d9d?auto=format&fit=crop&w=1951&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D">
|
||||
</ion-avatar>
|
||||
<ion-label>Wide Avatar</ion-label>
|
||||
</ion-item>
|
||||
</ion-content>
|
||||
|
||||
</ion-app>
|
||||
|
||||
Reference in New Issue
Block a user