1
私は応答性の高いバックグラウンドを作ろうとしています。 私は検索し、this linkを見ました。 しかし、それは動作しません。 私のcarousel
は、デバイスで修正するための幅を変更しません。 誰かが私にヒントを与えることができますか?レスポンシブルカルーセルとバックグラウンドの問題が発生しました。
これが私のHTMLです:
<html class='full' lang='en'>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="copyright" content=""/>
<meta name="author" contect="Toki, 2016/12/30"/>
<title>xxxx</title>
<meta name="keywords" content="3DGAME,iOS,Android"/>
<meta name="description" content="xxxxxxxx"/>
<link rel="shortcut icon" type="image/ico" href="favicon.ico"/>
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/toki.css" rel="stylesheet" type="text/css"/>
</head>
<body >
<div class='container'>
<div class='row'>
<img class='logo img-responsive' src='assets/media/logo.png'/>
</div>
<div class='row'>
<div class='col-xs-8 col-sm-8 col-md-8 col-lg-8 hidden-sx hidden-sm'>
<div class='main-content '>
<div class='downloadbox'>
<div class='downloadbtn'>
<a href="#" class='iosdownload'></a>
<a href="#" class='androiddownload'></a>
</div>
<a href='#' class='call-btn'></a>
</div>
</div>
</div>
</div>
<div class='row'>
<div class='col-xs-8 col-sm-8 col-md-8 col-lg-8'>
<div class='main-icon'>
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<ul class="nav nav-pills nav-justified">
<li data-target="#myCarousel" data-slide-to="0" class="active"><a href="#">Thông Tin game</a></li>
<li data-target="#myCarousel" data-slide-to="1"><a href="#">Tính Năng</a></li>
<li data-target="#myCarousel" data-slide-to="2"><a href="#">Nổi Bật</a></li>
</ul>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="assets/media/ts1.jpg"/>
</div><!-- End Item -->
<div class="item">
<img src="assets/media/ts2.jpg">
</div><!-- End Item -->
<div class="item">
<img src="assets/media/ts3.jpg">
</div><!-- End Carousel Inner -->
</div><!-- End Carousel Inner -->
</div>
</div>
</div>
</div>
</div>
<script src="assets/js/jquery-1.12.4.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/toki.js"></script>
</body>
</html>
これは私のCSSです:
.full {
background: url('../media/main-bg.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
}
body { background-color: transparent; }
.logo{
z-index:1;
}
.header{
text-align: left;
height: 59px;
position: relative;
z-index: 99999;
line-height: 0;
font-size: 12px;
background: url(../media/menu_bg.jpg) repeat-x center center;
}
.main-header{
position: relative;
}
.main-header > div{
float:right;
}
.menu-cant{
padding-right:350px;
}
.menu-game{
padding-right:20px;
}
.dropdown-btn{
color: #666666;
display: block;
width: 139px;
height: 24px;
line-height: 18px;
background: url(../media/scol.jpg) no-repeat center center;
padding: 4px 0 0 15px;
margin-top: 18px;
cursor: pointer;
}
.dropdown-menu{
margin-top:8px;
min-width:140px;
border-radius: 0 !important;
line-height:11px;
}
.dropdown-menu>li>a{
padding: 1px 12px;
}
.link-menu{
display:inline;
padding:20px 30px;
font-size:12px;
}
.link-menu span {
margin: 0 10px 0 0;
padding: 1px 0 0 22px;
display: inline-block;
height: 17px;
line-height: 18px;
font-size:13px;
}
.fanpage-menu{
background: url(../media/heart.jpg) no-repeat 0 center;
}
.fanpage-menu a{
color: #666;
text-decoration: none;
}
.user-menu{
background: url(../media/user.jpg) no-repeat 0 center;
}
.logout-menu{
background: url(../media/logout.jpg) no-repeat 0 center;
}
.login-menu{
background: url(../media/login.jpg) no-repeat 0 center;
}
.new-menu{
padding:30px 30px;
}
.new-menu ul{
width:100px;
list-style:none;
}
.dropdown-menu:before{
position: absolute;
top: -5px;
left: 125px;
display: inline-block;
border-right: 5px solid transparent;
border-bottom: 5px solid #ccc;
border-left: 5px solid transparent;
border-bottom-color: rgba(0, 0, 0, 0.2);
content: '';
}
.dropdown-menu:after {
position: absolute;
top: -4px;
left: 125px;
display: inline-block;
border-right: 5px solid transparent;
border-bottom: 5px solid #ffffff;
border-left: 5px solid transparent;
content: '';
}
.main-content{
width:673px;
}
.downloadbox{
background: url(../media/downloadbg2.png) 0 0 no-repeat;
height: 200px;
padding: 60px 0 0 8px;
position: relative;
left: -8px;
width: 700px;
margin-bottom: 9px;
}
.downloadbtn{
width: 242px;
margin: 10px 0 0 136px;
float: left;
display: inline;
}
.downloadbtn a{
width: 242px;
height: 55px;
display: block;
text-indent: -99999px;
overflow: hidden;
}
.iosdownload{
background: url(../media/iosbtn.png) 0 0 no-repeat;
}
.androiddownload{
margin: 10px 0 0 0;
background: url(../media/androidbtn.png) 0 0 no-repeat;
}
.call-btn{
background: url(../media/monibtn_g.png) 0 0 no-repeat;
width: 115px;
height: 116px;
margin: 10px 0px 0 21px;
float: left;
display: inline;
text-indent: -9999px;
overflow: hidden;
}
.phone-box{
padding:3px 0 15px 238px;
height:70px;
background:url(../media/phonebg.png) 0 0 no-repeat;
margin-bottom:15px;
min-width:700px;
}
.phone-box input.txt{
width:300px;
height:40px;
padding: 0px 6px;
line-height:40px;
border:none;
float:left;
display:inline;
margin-top:13px;
}
.phone-box input.txt:focus{outline:none }
.phone-box input.submit{
width:113px;
height:40px;
border:none;
background:url(../media/submit.jpg) 0 0 no-repeat;
cursor:pointer;
margin-top: 13px;
margin-left: 10px;
}
.main-icon{
width:670px;
}
#myCarousel .nav a small {
display:block;
}
#myCarousel .nav {
background:#eee;
}
#myCarousel .nav a {
border-radius:0px;
}
.carousel-inner{
background-color:#ffffff;
}
.carousel-inner .item img{
padding:10px;
}
すみません!私はそれをしましたが、私はモバイル画面でテストすると何も変わっていないように見えます。私の背景は私の大きな問題です。私は多くのコードを試しましたが、まだ動作しません。 – Hanata