负外边距:
负外边距的运用
书中下面的代码有些错误,width:100%和height:100%应该是设置在iframe元素上来继承类为object-wrapper的div宽高的,而不是将width:100%设置在div上。 .object-wrapper { position:relative; padding-bottom:75%; height: 0; } .object-wrapper iframe { position: absolute; top: 0; left: 0; width:100%; height:100%; }
https://alistapart.com/article/creating-intrinsic-ratios-for-video