【发布时间】:2015-06-05 11:14:12
【问题描述】:
我有一个两列页脚,当我缩小浏览器(列只是相互堆叠)并在媒体查询中点击第三个断点时,它不会调整大小。知道我应该改变什么吗?完整的小提琴在这里:https://jsfiddle.net/Cilvako/9wkquboa/
<footer>
<div class="small_left">
<p>Bacon ipsum dolor amet shoulder spare ribs venison cow salami, turducken ham hock tail bacon tri-tip. Ground round jowl filet mignon cupim. Drumstick ribeye porchetta cow andouille. Jerky sirloin kevin ribeye salami doner ground round. Beef ribs pork
porchetta meatloaf doner swine jowl tail kielbasa tenderloin frankfurter rump meatball. Beef meatball jerky andouille, corned beef doner chicken tri-tip pastrami porchetta spare ribs ham meatloaf. Bresaola capicola frankfurter filet mignon turducken</p>
</div>
<div class="small_right">
Turducken 牛里脊肉,landjaeger fatback 牛肉猪肉多纳牛腩 boudin leberkas 意大利腊肠舌头。猪肚干肉汤舌头 alcatra turducken rump doner 鹿肉火腿飞节猪 leberkaslandjaeger 沙朗 kielbasa。牛培根丁骨球尖kielbasa。
© 西尔维娅·博格丹,2015
footer {
width: 100%;
font-family: BrandonGrotesque-Regular, "futura-pt-1", "futura-pt-2", Verdana, serif;
font-size: 16px;
line-height: 25px;
margin-bottom: 0px;
clear: both;
}
/*left div footer*/
.small_left {
border: 1px solid black;
letter-spacing: 1px;
padding: 20px;
background-color: black;
color: white;
text-align: justify;
font-size: 13px;
}
/*right div footer*/
.small_right {
border: 1px solid black;
letter-spacing: 1px;
height: 175px;
padding: 20px;
background-color: black;
color: white;
font-size: 13px;
text-align: justify;
}
还有我遇到麻烦的媒体查询:
@media screen and (min-width: 769px) and (max-width: 1200px) {
footer {
width: 100%;
font-family: BrandonGrotesque-Regular, "futura-pt-1", "futura-pt-2", Verdana, serif;
font-size: 16px;
line-height: 25px;
margin-bottom: 0px;
clear: both;
/*border: 1px blue solid;*/
}
/*left div footer*/
.small_left {
letter-spacing: 1px;
display: inline-block;
width: 44%;
height: 252px;
background-color: black;
color: white;
text-align: justify;
font-size: 12px;
float: left;
}
/*right div footer*/
.small_right {
letter-spacing: 1px;
display: inline-block;
width: 44%;
height: 252px;
height: 175px;
background-color: black;
color: white;
font-size: 12px;
text-align: justify;
float: right;
}
}
【问题讨论】:
-
您有大量无效的 HTML。例如。
<div class="small_right",<p id="footer_copyright">&copy; Silvia Bogdan, 2015</div>。你应该正确缩进你的代码,这样你就不会错过这样的事情。 -
试试搔痒它(谢谢,谢谢......整个星期都在这里,试试小牛肉!);)
-
是的,没错,我想我已经在一次又一次地更改内容时删除了它们。我更正了它们,但这并没有影响结果,重新调整浏览器大小时,div 仍然堆叠得很奇怪。
标签: html css responsive-design