如图中所示,我的网页背景图片适合Chrome浏览器,但由于某些原因,即使窗口大小相同,图片在Firefox中也无法正确缩放。更糟糕的是,当我缩小窗口宽度时,它根本不能很好地缩放。我该如何知道某人正在使用的浏览器的窗口大小?在Chrome浏览器中正确显示网页,而不是在Firefox中
更新这里是图像。首先是铬,其次是火狐
https://www.flickr.com/photos/[email protected]/24491082235/in/dateposted-public/
https://www.flickr.com/photos/[email protected]/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;
}
你在说什么图片? – MortenMoulder
只有Chrome和Safari支持'webkit'相关风格和工具包。 – AMACB
我添加了图片 –