export const aspectRatio = (width, height) => {io
height: 0,di
overflow: 'hidden',co
paddingBottom: `${(height / width) * 100}%`,asp
}const
padding-bottom 值爲百分比時,百分比與其所在元素的父元素的寬度相關。