画像のサイズ問題に対処する
#HTML
#Webフロントエンド
code:html
<style>
img {
width: 100%;
height: auto;
aspect-ratio: attr(width) / attr(height);
}
</style>
<img alt="awosome image" src="/path/to/file.jpg" width="800" height="600">
こうすると画像のアスペクト比を保ちつつ、横幅を親要素に合わせることが可能になる。