【发布时间】:2017-01-16 17:07:41
【问题描述】:
使用谷歌浏览器的引导轮播出现问题。 在我的 CSS 中,我定义了多个 @media 宽度以在每种分辨率下完美地显示图像和文本。它在 Edge、IE 和 Firefox 中运行良好。但谷歌浏览器仅以较小的分辨率(最大 767 像素)显示 IMG。
我的“分辨率设置”:
@media (min-width: 1420px){
.reference {
display: flex;
width: 1170px;
padding-left: calc((100%-1179px)/2);
padding-right: calc((100%-1179px)/2);
}
.reference-img {
width: 50%;
}
.reference-info {
padding-top: 70px;
width: 50%;
color: #FFFFFF;
text-shadow: 0px 1px 4px #000000;
font-size: 20px;
}
.reference-info h1{
font-size: 60px;
}
.reference-info h2{
font-size: 40px;
}
.ctrl-style {
font-size: 40px;
}
}
@media (min-width: 1090px) and (max-width: 1419px){
.reference {
display: flex;
width: 900px;
padding-left: calc((100%-900px)/2);
padding-right: calc((100%-900px)/2);
}
.reference-img {
width: 50%;
}
.reference-info {
padding-top: 50px;
width: 50%;
color: #FFFFFF;
text-shadow: 0px 1px 4px #000000;
font-size: 16px;
}
.reference-info h1{
font-size: 50px;
}
.reference-info h2{
font-size: 30px;
}
.ctrl-style {
font-size: 40px;
}
}
@media (min-width: 880px) and (max-width: 1089px){
.reference {
display: flex;
width: 700px;
padding-left: calc((100%-700px)/2);
padding-right: calc((100%-700px)/2);
}
.reference-img {
width: 50%;
}
.reference-info {
padding-top: 20px;
width: 50%;
color: #FFFFFF;
text-shadow: 0px 1px 4px #000000;
font-size: 14px;
}
.reference-info h1{
font-size: 35px;
margin-bottom: 0px !important;
}
.reference-info h2{
font-size: 30px;
margin-bottom: 0px !important;
}
.ctrl-style {
font-size: 40px;
}
}
@media (min-width: 768px) and (max-width: 879px){
.reference {
display: flex;
width: 600px;
padding-left: calc((100%-600px)/2);
padding-right: calc((100%-600px)/2);
}
.reference-img {
width: 50%;
}
.reference-info {
padding-top: 15px;
width: 50%;
color: #FFFFFF;
text-shadow: 0px 1px 4px #000000;
font-size: 14px;
}
.reference-info h1{
font-size: 30px;
margin-bottom: 0px !important;
}
.reference-info h2{
font-size: 25px;
margin-bottom: 0px !important;
}
.ctrl-style {
font-size: 40px;
}
}
@media (max-width: 767px){
.reference {
width: 100%;
padding-left: 50px;
padding-right: 50px;
}
.reference-img {
width: 90%;
padding-left: 5%;
padding-right: 5%;
}
.reference-info {
padding-top: 15px;
width: 100%;
color: #FFFFFF;
text-shadow: 0px 1px 4px #000000;
font-size: 14px;
}
.reference-info h1{
font-size: 22px;
margin-bottom: 0px !important;
}
.reference-info h2{
font-size: 22px;
margin-bottom: 0px !important;
}
.ctrl-style {
font-size: 25px;
}
}
这是一个 Bootply,用 Chrome 打开它,你就能明白我的意思了。 http://www.bootply.com/tcUZLBKQna
【问题讨论】:
标签: html css twitter-bootstrap google-chrome twitter-bootstrap-3