【发布时间】:2016-01-20 09:46:01
【问题描述】:
如图所示,我网页的背景图像适合 chrome,但由于某种原因,即使窗口大小相同,图像也无法在 Firefox 中正确缩放。更糟糕的是,当我缩小窗口宽度时,它根本不能很好地缩放。我应该如何知道某人正在使用的浏览器的窗口大小?
更新这里是图片。第一个是chrome,第二个是firefox
https://www.flickr.com/photos/125343138@N07/24491082235/in/dateposted-public/
https://www.flickr.com/photos/125343138@N07/24464890356/in/dateposted-public/
这是样式表
.nav {
list-style-type: none;
margin: 0;
padding: 0;
width: fill;
overflow: hidden;
background-color: #333;
}
.nav li {
display: inline;
padding: 20px 10px;
}
.nav li a {
color: whitesmoke;
padding: 14px 190px;
font-family: 'futura';
font-size: 16px;
position: relative;
top: 5px;
}
.jmb {
background-image: url('https://farm2.staticflickr.com /1600/24149223706_da584c8c45_o.jpg');
height: 100%;
width: 100%;
position:absolute;
background-repeat: no-repeat;
background-size:contain;
background-position: 00px 37px;
}
.jmb h5 {
font-family: 'Yellowtailregular';
font-size: 105px;
color: black;
margin-top: 170px;
margin-left: 190px;
-webkit-animation-delay: 1s;
-webkit-animation-duration: 4s;
}
.jmb div p
{
font-size: 27px;
font-family: 'futura';
margin-left: 110px;
margin-top: -24px;
word-wrap: break-word;
width: 27%;
-webkit-animation-delay: 2s;
-webkit-animation-duration: 4s;
}
【问题讨论】:
-
你在说什么图片?
-
只有 Chrome 和 Safari 支持
webkit相关的样式和工具包。