Html 如何让这个div停留在页面的末尾(而不是窗口的底部)?
在这个页面()上,当页面宽度<900px时,页脚会跳到页面顶部,我希望它在宽度>1000px时保持在原来的位置 CSS 尝试将id=“end”移动到class=“story”之外,然后尝试将此css用于id=“end”Html 如何让这个div停留在页面的末尾(而不是窗口的底部)?,html,css,responsive-design,Html,Css,Responsive Design,在这个页面()上,当页面宽度1000px时保持在原来的位置 CSS 尝试将id=“end”移动到class=“story”之外,然后尝试将此css用于id=“end” 您的媒体查询正在缩小您的内容。。。将其从CSS中删除 @media handheld, screen and (max-width: 1000px){ .header { max-height: 600px; } } 在CSS中可用的是媒体规则 @media only screen
您的媒体查询正在缩小您的内容。。。将其从CSS中删除
@media handheld, screen and (max-width: 1000px){
.header {
max-height: 600px;
}
}
在CSS中可用的是媒体规则
@media only screen
and (min-width : 900px) {
div.#footer {
/* style for top of page Note: div is to add more specificity Greater than 1000px is next */
}
}
#footer {
/* style for width is > 1000px */
font-size: .8em;
letter-spacing: .128em;
font-family: "brandon-grotesque",Helvetica,sans-serif;
font-weight: 600;
text-transform: uppercase ;
padding-top: 20px;
padding-bottom: 20px;
color: #272732;
background-color: white;
height: auto;
bottom: 0px;
}
除此之外的任何内容都需要javascript。您可以尝试添加此css属性“clear:All”吗?我想它会解决这个问题。900到1000之间的宽度呢?我假设宽度小于900,大于900?
@media handheld, screen and (max-width: 1000px){
.header {
max-height: 600px;
}
}
@media only screen
and (min-width : 900px) {
div.#footer {
/* style for top of page Note: div is to add more specificity Greater than 1000px is next */
}
}
#footer {
/* style for width is > 1000px */
font-size: .8em;
letter-spacing: .128em;
font-family: "brandon-grotesque",Helvetica,sans-serif;
font-weight: 600;
text-transform: uppercase ;
padding-top: 20px;
padding-bottom: 20px;
color: #272732;
background-color: white;
height: auto;
bottom: 0px;
}