尝试应用一些媒体查询。
没有媒体查询的 CSS
blockquote {
margin: 1.5em 0;
font-family: 'Gentium Basic', Georgia, serif;
font-size: 20px;
line-height: 1.6em;
font-weight: normal;
font-style: italic;
border-left: 1px dotted;
padding: 0 0 0 25px;
left: 50%;
margin-left: -150px;
width: 650px;
}
然后申请:
/* larger than 800px */
@media only screen and (min-width: 801px) {
#mobileNav {
height: 0 !important;
}
}
/* 800px and smaller */
@media only screen and (max-width: 800px) {
#bannerImage {
background-attachment: scroll !important;
}
blockquote {
margin: 1.5em 0;
font-family: 'Gentium Basic', Georgia, serif;
font-size: 20px;
line-height: 1.6em;
font-weight: normal;
font-style: italic;
border-left: 1px dotted;
padding: 0 0 0 25px;
}
网站在这里
我想要做的是让块引用适合屏幕。目前,当页面的宽度发生变化时,它会这样做:
当我希望它这样做时: