Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何阻止文本与CSS重叠?_Css_Html - Fatal编程技术网

如何阻止文本与CSS重叠?

如何阻止文本与CSS重叠?,css,html,Css,Html,我正在为大学创建一个网站,我不知道当我把网页浏览器变小时,如何防止文本重叠。这就是我的意思: (不重叠) (重叠) 这是我的JSFIDLE:() 提前谢谢 假设要将单词类添加到段落标记中(没有html,我们只能猜测),只需删除高度声明即可 .words { font-family: apple; font-size: 20px; max-width: 800px; margin-top: 10px; margin-left: 42%; } 假设您正在将words类添加到段落标记中(没有ht

我正在为大学创建一个网站,我不知道当我把网页浏览器变小时,如何防止文本重叠。这就是我的意思:

(不重叠)

(重叠)

这是我的JSFIDLE:()


提前谢谢

假设要将
单词
类添加到段落标记中(没有html,我们只能猜测),只需删除
高度
声明即可

.words {
font-family: apple;
font-size: 20px;
max-width: 800px;
margin-top: 10px;
margin-left: 42%; }

假设您正在将
words
类添加到段落标记中(没有html,我们只能猜测),只需删除
height
声明即可

.words {
font-family: apple;
font-size: 20px;
max-width: 800px;
margin-top: 10px;
margin-left: 42%; }

假设您正在将
words
类添加到段落标记中(没有html,我们只能猜测),只需删除
height
声明即可

.words {
font-family: apple;
font-size: 20px;
max-width: 800px;
margin-top: 10px;
margin-left: 42%; }

假设您正在将
words
类添加到段落标记中(没有html,我们只能猜测),只需删除
height
声明即可

.words {
font-family: apple;
font-size: 20px;
max-width: 800px;
margin-top: 10px;
margin-left: 42%; }

对于您的小提琴示例,我会将标题栏更改为最小高度,而不是固定高度。这将使其具有响应性,而不是与以下文本重叠

#title_bar {
    margin-top:78px;
    left:-17px;
    width:101.5%;
    min-height:30px;
    background:blue;
    position:relative;
    top:-70px;
    z-index:3;
    border: 3px rgba(255, 105, 180, 1) solid;
    background-image: -webkit-gradient(linear, right bottom, right top, color-stop(0, #5977FF), color-stop(1, #59C5FF));
    background-image: -o-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: -moz-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: -webkit-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: -ms-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: linear-gradient(to top, #5977FF 0%, #59C5FF 100%);
}

对于您的小提琴示例,我会将标题栏更改为最小高度,而不是固定高度。这将使其具有响应性,而不是与以下文本重叠

#title_bar {
    margin-top:78px;
    left:-17px;
    width:101.5%;
    min-height:30px;
    background:blue;
    position:relative;
    top:-70px;
    z-index:3;
    border: 3px rgba(255, 105, 180, 1) solid;
    background-image: -webkit-gradient(linear, right bottom, right top, color-stop(0, #5977FF), color-stop(1, #59C5FF));
    background-image: -o-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: -moz-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: -webkit-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: -ms-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: linear-gradient(to top, #5977FF 0%, #59C5FF 100%);
}

对于您的小提琴示例,我会将标题栏更改为最小高度,而不是固定高度。这将使其具有响应性,而不是与以下文本重叠

#title_bar {
    margin-top:78px;
    left:-17px;
    width:101.5%;
    min-height:30px;
    background:blue;
    position:relative;
    top:-70px;
    z-index:3;
    border: 3px rgba(255, 105, 180, 1) solid;
    background-image: -webkit-gradient(linear, right bottom, right top, color-stop(0, #5977FF), color-stop(1, #59C5FF));
    background-image: -o-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: -moz-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: -webkit-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: -ms-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: linear-gradient(to top, #5977FF 0%, #59C5FF 100%);
}

对于您的小提琴示例,我会将标题栏更改为最小高度,而不是固定高度。这将使其具有响应性,而不是与以下文本重叠

#title_bar {
    margin-top:78px;
    left:-17px;
    width:101.5%;
    min-height:30px;
    background:blue;
    position:relative;
    top:-70px;
    z-index:3;
    border: 3px rgba(255, 105, 180, 1) solid;
    background-image: -webkit-gradient(linear, right bottom, right top, color-stop(0, #5977FF), color-stop(1, #59C5FF));
    background-image: -o-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: -moz-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: -webkit-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: -ms-linear-gradient(top, #5977FF 0%, #59C5FF 100%);
    background-image: linear-gradient(to top, #5977FF 0%, #59C5FF 100%);
}

不要声明高度。允许文本本身强制容器展开。好的,谢谢你的帮助,它已经工作了!对不起,我当时很愚蠢,我已经摆脱了它,现在它可以工作了。谢谢:)不要声明高度。允许文本本身强制容器展开。好的,谢谢你的帮助,它已经工作了!对不起,我当时很愚蠢,我已经摆脱了它,现在它可以工作了。谢谢:)不要声明高度。允许文本本身强制容器展开。好的,谢谢你的帮助,它已经工作了!对不起,我当时很愚蠢,我已经摆脱了它,现在它可以工作了。谢谢:)不要声明高度。允许文本本身强制容器展开。好的,谢谢你的帮助,它已经工作了!对不起,我当时很愚蠢,我已经摆脱了它,现在它可以工作了。谢谢:)啊,谢谢你,老兄,这让我的网站看起来好了10倍!再次感谢!啊,谢谢你,伙计,这让我的网站看起来好了10倍!再次感谢!啊,谢谢你,伙计,这让我的网站看起来好了10倍!再次感谢!啊,谢谢你,伙计,这让我的网站看起来好了10倍!再次感谢!