【CSS】max-height - 要素の高さ(最大値)
CSSのmax-heightプロパティをご紹介します。
max-height
max-heightは要素の高さの最大値を示すプロパティです。
基本構文
max-height: 値;
サンプル
<style>
img {
height: 200px;
max-height: 100px;
}
</style>
<img src="/storage/app/media/image/hacker-commandline-2048x1365.jpeg">