У меня есть загрузочный сайт, прекрасно работающий на рабочем столе и (я думал) мобильный, потому что, когда я перетаскиваю размер браузера на рабочий стол, чтобы быть супертонким, сайт отлично отображается ... однако на фактическое мобильное устройство, это не так. Верхний div (jumbotron) ломается, а цвет фона переходит в следующий раздел.bootstrap div ломается на мобильном телефоне iphone
Может кто-нибудь, пожалуйста, взгляните и предложите свое мнение? В лучшем случае я новичок-кодер и некоторое время пытаюсь устранить неполадки без везения.
Сайт www.artyst-tyrant.com
HTML:
<body>
<div class="jumbotron" id="top">
<div class="video">
<video class="video-background visible-lg" no-controls autoplay loop src="img/dino-video.mp4?dl=0" poster="img/dino.png"></video></div>
<!--[if lt IE 9]>
<script>
document.createElement('video');
</script>
<![endif]-->
<div class="container content">
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Artyst Tyrant</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="#intro" class="smoothScroll">Intro <span class="sr-only \">(current)</span></a></li>
<li><a href="#services" class="smoothScroll">Services</a></li>
<li><a href="#work" class="smoothScroll">Work</a></li>
<li><a href="#experience" class="smoothScroll">Experience</a></li>
<li><a href="#about" class="smoothScroll">About</a></li>
<li><a href="#contact" class="smoothScroll">Contact</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="row text-center text-container">
<h1>creating inspiring brands</h1>
<h2>to empower intelligent business</h2>
<h5>Isn’t it time the quality of your brand matched the quality of your business?</h5>
<a href="#contact" class="btn btn-primary btn-lg smoothScroll">Get Started Now</a>
</div></div>
</div>
<!--End Jumbotron-->
CSS:
/*logo */
.navbar-brand {
width:229px;
height:108px;
padding:0;
margin:0 0 0 60px;
background: url(../img/logo.png) no-repeat;
text-indent:-9999px;
z-index: 5;
}
/*nav bar */
.navbar-default {
background:none;
border:none;
z-index: 5;
}
.navbar-default .navbar-nav li a {
font-size: 16px;
font-weight:400;
text-transform:uppercase;
letter-spacing:2px;
color:#ecf0f1;
padding: 15px 0;
text-align:center;
z-index: 5;
}
.navbar-default .navbar-nav li a:hover, .navbar-default .navbar-nav li a:focus {
color:#e5c6f1;
text-decoration:underline;
z-index: 5;
-o-transition:.5s;
-ms-transition:.5s;
-moz-transition:.5s;
-webkit-transition:.5s;
transition:.5s;
}
.navbar-default .navbar-nav .active a, .navbar-default .navbar-nav .active a:hover, .navbar-default .navbar-nav .active a:focus {
background:none;
outline: 0;
color:#fff;
font-weight:700;
z-index: 5;
}
.navbar-toggle {
border:none;
margin-top:0;
margin-right:0;
width:32px;
height:32px;
text-align: center;
z-index: 5;
}
.navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {
background:none;
outline: none;
z-index: 5;
}
.navbar-default .navbar-collapse {
border:none;
background: rgba(255,255,255,0.08);
border-radius: 2px;
box-shadow:none;
z-index: 5;
}
/* end navigation */
/* end navigation */
.jumbotron {
background: url(../img/dino.png) no-repeat #8e44ad;
background-size:cover;
max-height:900px;
margin:0;
position:relative;
z-index: 2;
background-attachment: fixed;
width: 100%;
overflow: hidden;
background-attachment: fixed;
}
.video-background { /* class name used in javascript too */
width: 100%; /* width needs to be set to 100% */
height: 100%; /* height needs to be set to 100% */
position: absolute;
left: 0;
top: 0;
z-index: -2;
}
video { display: block;
opacity: .4; filter: alpha(opacity=40); -moz-opacity: .4;
filter:alpha(opacity=40); /* for IE only */
-khtml-opacity: 0.4;
}
.jumbotron:after {
background: url(../img/stripes.png) center repeat;
position: absolute;
top: 1;
left: 0;
right: 0;
bottom: 0;
height: 900px;
z-index: -1;
content: '';
-webkit-transform: translate3d(0,0,0);
}
Как я уже сказал, перемещая его вниз к мобильной ширине в шоу настольного браузера мобильный телефон отлично, но посмотрите на него на iPhone и верхние разрывы div. Любая помощь будет принята с благодарностью.
В следующий раз, когда вы хотите эмулировать мобильное устройство, откройте инструменты разработчика в Chrome. Оттуда вы можете выбрать из списка устройств по умолчанию (и разрешения экрана) или указать свой собственный. – Mathemats