[英]How to re-size text and css background image like <img> is re-sizing in this example?
[英]how to keep content of page from re-sizing when the page is re-size to a smaller width
嘿伙计们,我需要关于重新调整页面大小的帮助.. 当页面宽度重新调整为较小的宽度时,我如何阻止页面内容重新调整大小,就像facebook一样
如果要停止调整内容大小,请将大小放在标记为 X 和 Y 的位置(以像素为单位)
img {
height:Xpx;
width:Ypx;
}
如果您想保留图像的纵横比,您应该查看 - 如何防止在 CSS 中调整图像大小?
这是那里的代码
img {
max-width: 100%;
height: auto;
width: auto\9; /* ie8 */
}
或者
img {
width:100%;
height:auto
}
两者几乎一样
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.