1
更新:我想通了。 iOS 7不喜歡vh單元。所以我轉而使用JavaScript來檢測瀏覽器高度,現在它可以在iOS 7上運行。網頁在iOS 7崩潰
我製作了一個網站,可以在我測試過的所有設備上運行,但帶有iOS 7的iPhone除外。整個頁面崩潰,這個瘋狂的迪斯科閃爍的東西嗎?
在iOS 7的結果可以在這裏看到:http://morten-hauge.com/diverse/ios7_fail.MOV
如果我刪除我的CSS文件加載頁面,你會期望沒有CSS頁面。
*
{
margin: 0;
padding: 0;
}
a, a img
{
text-decoration: none;
border-style: none;
}
#splash-container
{
position: fixed;
top: 40px;
right: 40px;
-webkit-backface-visibility: hidden;
}
img.splash
{
display: block;
width: 100px;
height: 100px;
margin: 0 0 20px 0;
transition-duration: .2s, .2s;
transition-timing-function: linear, ease-in;
-ms-transition-duration: .2s, .2s;
-ms-transition-timing-function: linear, ease-in;
-webkit-transition-duration: .2s, .2s;
-webkit-transition-timing-function: linear, ease-in;
-o-transition-duration: .2s, .2s;
-o-transition-timing-function: linear, ease-in;
-moz-transition-duration: .2s, .2s;
-moz-transition-timing-function: linear, ease-in;
}
img.splash:hover
{
transform: scale(1.1);
-ms-transform: scale(1.1);
-webkit-transform: scale(1.1);
-o-transform: scale(1.1);
-moz-transform: scale(1.1);
cursor: pointer;
}
#splash1-mobil
{
display: none;
}
.pil
{
width: 40px;
height: 40px;
margin: 160px auto 0 auto;
padding: 0;
position: relative;
animation: arrowAni 1.5s ease-in-out infinite;
-webkit-animation: arrowAni 1.5s ease-in-out infinite;
-moz-animation: arrowAni 1.5s ease-in-out infinite;
-o-animation: arrowAni 1.5s ease-in-out infinite;
-ms-animation: arrowAni 1.5s ease-in-out infinite;
-webkit-perspective: 1000;
-webkit-backface-visibility: hidden;
}
img.pil
{
-webkit-backface-visibility: hidden;
}
a img.pil
{
-webkit-backface-visibility: hidden;
}
@keyframes arrowAni
{
0% { bottom: 10px;}
50% { bottom: 30px;}
100% { bottom: 10px;}
}
@-webkit-keyframes arrowAni
{
0% { bottom: 10px;}
50% { bottom: 30px;}
100% { bottom: 10px;}
}
@-moz-keyframes arrowAni
{
0% { bottom: 10px;}
50% { bottom: 30px;}
100% { bottom: 10px;}
}
@-o-keyframes arrowAni
{
0% { bottom: 10px;}
50% { bottom: 30px;}
100% { bottom: 10px;}
}
@-ms-keyframes arrowAni
{
0% { bottom: 10px;}
50% { bottom: 30px;}
100% { bottom: 10px;}
}
.section
{
width: 100%;
height: 80vh;
padding: 30vh 0 50px 0;
text-align: center;
}
.content
{
background: #FFF;
background: rgba(255,255,255,.8);
padding: 40px 40px 20px 40px;
width: 40%;
margin: 0 auto 0 auto;
text-align: center;
}
#intro
{
background: url('img/intro.jpg');
background-size: cover;
background-attachment: fixed;
}
span.handsome
{
font-family: 'Handsome';
text-transform: none;
font-size: 45px;
line-height: 10px;
margin: 0 0 0 0;
}
h1,h2
{
font-family: 'GarageGothic';
text-transform: uppercase;
font-weight: normal;
font-size: 60px;
}
h2
{
margin: 0 0 20px 0;
}
h3
{
font-family: 'GarageGothic';
text-transform: uppercase;
font-weight: normal;
font-size: 40px;
margin: 0 0 20px 0;
}
.content p
{
font-family: 'OpenSans';
margin: 0 0 30px 0;
font-size: 18px;
}
.button
{
font-family: 'GarageGothic';
font-size: 30px;
background: #e65a50;
padding: 5px 30px 5px 30px;
cursor: pointer;
margin: 20px;
-webkit-box-shadow: 5px 5px 0px #bfbfbf;
-moz-box-shadow: 5px 5px 0px #bfbfbf;
box-shadow: 5px 5px 0px #bfbfbf;
text-align: center;
color: #000;
}
.button:hover
{
background: #ff665b;
}
.button:active
{
background: #e65a50;
}
.button-clicked
{
background: #d4edb5;
cursor: default;
}
.button-clicked:hover
{
background: #d4edb5;
}
.disabled
{
opacity: .5;
background: #CCC;
cursor: default;
}
.disabled:hover
{
background: #CCC;
}
.button a, .button a:visited
{
color: #000;
text-decoration: none;
}
span.steps
{
font-family: 'OpenSans';
font-size: 10px;
margin: 40px 0 0 0;
display: block;
color: #7e7e7e;
}
ul#sticky
{
position: fixed;
top: 25px;
left: 25px;
}
ul#sticky li
{
font-family: 'OpenSans';
padding: 10px;
color: #000;
background: #FFF;
background: rgba(255,255,255,0.8);
border-bottom: 1px solid #FFF;
border-right: 1px solid #FFF;
border-left: 1px solid #FFF;
font-size: 12px;
list-style: none;
}
ul#sticky li:first-child
{
border-top: 1px solid #FFF;
background: #FFF;
background: rgba(255,255,255, .8);
font-family: 'GarageGothic';
text-transform: uppercase;
font-size: 20px;
text-align: center;
}
img.checkmark
{
width: 10px;
height: 10px;
margin: 0 3px 0 0;
}
#vann-section
{
background: url('img/vann.jpg');
background-size: cover;
background-attachment: fixed;
}
#ifboligsjekk-section
{
background: url('img/ifboligsjekk.jpg');
background-size: cover;
background-attachment: fixed;
}
#boligsjekk-splash
{
width: 80px;
height: 80px;
display: block;
left: 25%;
margin: -50px 0 0 0;
position: absolute;
transition-duration: .2s, .2s;
transition-timing-function: linear, ease-in;
-ms-transition-duration: .2s, .2s;
-ms-transition-timing-function: linear, ease-in;
-webkit-transition-duration: .2s, .2s;
-webkit-transition-timing-function: linear, ease-in;
-o-transition-duration: .2s, .2s;
-o-transition-timing-function: linear, ease-in;
-moz-transition-duration: .2s, .2s;
-moz-transition-timing-function: linear, ease-in;
-webkit-perspective: 1000;
-webkit-backface-visibility: hidden;
}
#boligsjekk-splash:hover
{
transform: scale(1.1);
-ms-transform: scale(1.1);
-webkit-transform: scale(1.1);
-o-transform: scale(1.1);
-moz-transform: scale(1.1);
cursor: pointer;
}
#brannskader-section
{
background: url('img/brann.jpg');
background-size: cover;
background-attachment: fixed;
}
#handverker-section
{
background: url('img/håndverker.jpg');
background-size: cover;
background-attachment: fixed;
}
#sopp-section
{
background: url('img/sopp.jpg');
background-size: cover;
background-attachment: fixed;
}
#dyroginsekter-section
{
background: url('img/skadedyr.jpg');
background-size: cover;
background-attachment: fixed;
}
#leieinntekt-section
{
background: url('img/leieinntekt.jpg');
background-size: cover;
background-attachment: fixed;
}
#rettshjelp-section
{
background: url('img/rettshjelp.jpg');
background-size: cover;
background-attachment: fixed;
}
#tyveri-section
{
background: url('img/tyveri.jpg');
background-size: cover;
background-attachment: fixed;
}
#naturskade-section
{
background: url('img/naturskade.jpg');
background-size: cover;
background-attachment: fixed;
}
#resultat
{
width: 100%;
min-height: 80vh;
height: 100%;
padding: 30vh 0 50px 0;
text-align: center;
background: url('img/res.jpg');
background-size: cover;
background-attachment: fixed;
}
#resultat .content
{
padding: 40px;
}
#resultat p
{
line-height: 28px;
}
#resultat .button
{
display: inline-block;
font-size: 20px;
}
#button-ops-container
{
font-family: 'GarageGothic';
text-transform: uppercase;
font-size: 30px;
background: #e65a50;
padding: 5px 30px 5px 30px;
cursor: pointer;
margin: 20px;
-webkit-box-shadow: 5px 5px 0px #bfbfbf;
-moz-box-shadow: 5px 5px 0px #bfbfbf;
-o-box-shadow: 5px 5px 0px #bfbfbf;
-ms-box-shadow: 5px 5px 0px #bfbfbf;
box-shadow: 5px 5px 0px #bfbfbf;
text-align: center;
color: #000;
}
#button-ops-container:hover
{
background: #ff665b;
}
#button-ops-container:active
{
background: #e65a50;
}
#ops
{
color: #000;
text-decoration: none;
}
#ops:visited
{
color: #000;
}