我的标题中有我的 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>
最佳答案
根据您所说的“落在浏览器之外”的含义,解决方案可能是将最大高度换成最小高度。
#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/
不幸的是,你的问题陈述含糊不清,可能意味着很多事情,我的具体解决方案只能解决其中一个问题
关于html - 当我调整我的浏览器大小时,我的内容落在我的标题之外,我该如何阻止它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43336500/