height) not working in Firefox
I'm looking for a way to set an image to the 100% height of the browser window (with a small padding at the bottom), centred on the page.
I've set up an example in codepen, which works great in Chrome and Safari, but not Firefox, where the image shows at full size. What am I missing?
http://cdpn.io/sHJhl
.photo-bkg
also needs its height
set:
.photo-bkg { height: 100%; }
Here's a working fork of your pen.
链接地址: http://www.djcxy.com/p/64502.html上一篇: 以100%的高度按比例调整div的宽度
下一篇: 高度)在Firefox中不起作用