HTML - 防止溢出?

标签 html css

我的网站有一个页脚内容, 但如果你在更大的屏幕上看,或者缩小, 它会流出 div。

LIVE DEMO

代码


#yht { //Footer container
width: 100%;
min-height: 20px;
max-height: 30px;
vertical-align: middle;
background: black;
text-align:center;
opacity: 0.7;
max-height: auto;
height: auto;
overflow: hidden;
}

#main:hover #yht span {
opacity: 1;
}

#yht span {
text-align:center;
position: relative;
display: block;
margin-top: auto;
margin-bottom: auto;
padding: 5px;
}

#yht2 { //Text ul
display: block;
height: auto;
max-height: auto;
margin-top: auto;
margin-bottom: auto;
}

#yht2 ul li {
font-size: 50px;
color: magenta;
overflow: hidden;
display: block;
margin-top: auto;
margin-bottom: auto;
}

最佳答案

移除 ID #yht 上的 max-height: 30px;

关于HTML - 防止溢出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21283962/

相关文章:

css - 为什么我看不到使用 bootstrap CSS 设置的背景图片,但可以看到外部图片资源?

javascript - 如何将表格从中心向右移动

html - IE8/9 + Quirks 模式不透明度不起作用

html - Google Fiber计划和定价菜单-如何做到的?

javascript - 如果当前选项卡有空字段,则阻止下一个选项卡

html - Max-height 和 margin-bottom 在 Webkit 中工作正常,在 Firefox 中不行

html - 下拉中心文本

html - 如何使此图像灯箱同时适用于水平和垂直图像?

javascript - 如何在 tinymce 中添加多种语言(印地语和英语)

css - Bootstrap 导航栏定位在其他 div 的底部