繁体   English   中英

当我调整浏览器的大小时,我的内容不在标题范围内,如何停止此操作?

[英]When I resize my browser my content falls outside of my header how can I stop this?

我的标题中包含h1,我想知道如何在调整浏览器大小时使标题响应和调整大小,以使内容不会溢出到标题上。 如果可以解决我的问题,我可以完全重做代码。

 #header { max-height:110px; background-color: darkorange; border: 1px solid burlywood; border-bottom: 1px solid black; } 
 <h1> Guide to Painting:A guide to getting your painting projects done efficiently and quickly!</h1> 

根据您所说的“落在浏览器之外”的意思,解决方案可能是将max-height交换为min-height。

 #header { min-height: 110px; background-color: darkorange; border: 1px solid burlywood; border-bottom: 1px solid black; } 
 <div id="header"> <h1> This is a long text might overflows to the right if the window is narrow </h1> </div> 

https://jsfiddle.net/8jnofysv/

不幸的是,您的问题陈述含糊不清,可能有很多含义,我的特定解决方案只能解决其中的一种

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM