2016-05-16 56 views
0

因此,我有3个图像包裹在div中,并且我使用了float:left;和“左拉”来试图让图像彼此相邻排列,但是他们不会因为某种原因。他们并排排列,然后我添加了一个jQuery循环插件,将图像制作为淡入/淡出图像(在#Slideshow div中)中的单个幻灯片,然后我添加了堆叠在另一个之上的脚本,然后不知道如何解决这个问题。需要帮助在自举网格中并排对齐div

/*style sheet*/ 
 

 

 
#Backg 
 
{ 
 
background-image: url("Graphics/ravenna.png"); 
 
background-repeat: repeat; 
 
height: 100%; 
 
} 
 

 

 
/*Biggest Container and Pattern Backg*/ 
 
#PrimaryC { 
 
padding: 10px; 
 
background-image: url("Graphics/paper_fibers.png"); 
 
background-repeat: repeat; 
 
height: 100%; 
 
-moz-box-shadow: 0px 0px 20px #000000; 
 
-webkit-box-shadow: 0px 0px 20px #000000; 
 
box-shadow: 0px 0px 20px #000000; 
 
} 
 

 
#Header /*Retro Games Arcade Logo*/ 
 
{ 
 
height: 100px; 
 
width: 100%; 
 
background-image: url("Graphics/SiteLogo.png"); 
 
background-repeat: no-repeat; 
 
background-size: 100% 100%; 
 
background-position: center; 
 
} 
 

 

 

 
.Content /*Holds Arcade Photo and Text in 2 columns*/ 
 
{ 
 
width: 100%; 
 
height: 500px; 
 
background-color: white; 
 
resize: both; 
 
border-radius: 0px 25px 25px 25px; 
 
border: 1px solid white; 
 

 
} 
 

 
#HeaderText /*Title*/ 
 
{ 
 
font-family:'Rokkitt', serif; 
 
font-size: 35px; 
 
color: black; 
 
text-decoration: underline; 
 
padding-right: 20px; 
 
} 
 

 
#RegularText /*Main Text Body*/ 
 
{ 
 

 

 
font-family:'Rokkitt', serif; 
 
font-size: 18px; 
 
padding-right: 20px; 
 
} 
 

 
.dropcap 
 
{ float: left; 
 
color: #903; 
 
font-size: 75px; 
 
line-height: 60px; 
 
padding-top: 4px; 
 
padding-right: 8px; 
 
padding-left: 3px; 
 
font-family: Georgia; 
 
} 
 

 

 
#Arcade /*Arcade Photo*/ 
 
{ 
 
width: 100%; 
 

 
} 
 

 
/*Navigational Buttons*/ 
 
.post-content 
 
{ 
 
font-family:'Didact Gothic', sans-serif; 
 
font-size: 150%; /*20px*/ 
 
top: 120px; 
 
left:15px; 
 
position: relative; 
 
letter-spacing: 2px; 
 

 
} 
 

 
#RightRow 
 
{ 
 
Position: relative; 
 
} 
 

 
.centerBlock 
 
{ 
 
position: relative; 
 
top: -200px; 
 
padding-left: 10px; 
 
} 
 

 
#slideshow img 
 
{ 
 
float: left; 
 
margin-right: 25px; 
 
margin: 0; 
 
position: relative; 
 

 
} 
 

 
#slideshow 
 
{ 
 

 
margin:auto; 
 

 
} 
 

 

 

 

 
@keyframes slideshow 
 
{ 
 
0% {background-color: white;] 
 
50% {background-color: red;} 
 
} 
 

 
} 
 

 

 
.col-md-12 
 
{ 
 
position: relative; 
 

 

 

 
} 
 

 

 

 

 
.footer-basic-centered{ 
 
background-color: #683025; 
 
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.12); 
 
box-sizing: border-box; 
 
width: 100%; 
 
text-align: center; 
 
font: normal 18px sans-serif; 
 
box-shadow: 0 5px 5px -5px black; 
 
padding: 15px; 
 
margin-top: 80px; 
 
} 
 

 
.footer-basic-centered .footer-company-motto{ 
 
color: white; 
 
font-size: 24px; 
 
margin: 0; 
 
font-family:'Rokkitt', serif; 
 
} 
 

 
.footer-basic-centered .footer-company-name{ 
 
color: #8f9296; 
 
font-size: 14px; 
 
margin: 0; 
 
} 
 

 
.footer-basic-centered .footer-links{ 
 
list-style: none; 
 
font-weight: bold; 
 
color: #ffffff; 
 
padding: 35px 0 23px; 
 
margin: 0; 
 
font-family: 'Didact Gothic', sans-serif; 
 
} 
 

 
.footer-basic-centered .footer-links a{ 
 
display:inline-block; 
 
text-decoration: none; 
 
color: inherit; 
 
} 
 

 

 

 
@media (max-width: 600px) { 
 

 
\t .footer-basic-centered{ 
 
\t \t padding: 35px; 
 
\t } 
 

 
\t .footer-basic-centered .footer-company-motto{ 
 
\t \t font-size: 18px; 
 
\t } 
 

 
\t .footer-basic-centered .footer-company-name{ 
 
\t \t font-size: 12px; 
 
\t } 
 

 
\t .footer-basic-centered .footer-links{ 
 
\t \t font-size: 14px; 
 
\t \t padding: 25px 0 20px; 
 
\t } 
 

 
\t .footer-basic-centered .footer-links a{ 
 
\t \t line-height: 1.8; 
 
\t } 
 
} 
 

 

 
/*Desktop*/ 
 
#Home, #Stock, #AboutUs, #ContactUs 
 
{ 
 
padding-bottom: 22px; 
 
position: relative; 
 
top: -360px; 
 
} 
 

 

 

 
/*Tablet Devices*/ 
 
@media (min-width: 768px) and (max-width: 969px) { 
 
#Home, #Stock, #AboutUs, #ContactUs 
 
{ 
 
padding-bottom: 18px; 
 
position: relative; 
 
top: -270px; 
 
font-size: 50%; 
 

 

 
} 
 
} 
 
/*Mobile Devices*/ 
 
@media(max-width: 767px) { 
 
#Home, #Stock, #AboutUs, #ContactUs 
 
{ 
 
padding-bottom: 18px; 
 
position: relative; 
 
font-size: 20%; 
 
top: auto; 
 
} 
 
.post-content 
 
{ 
 
top: 20px; 
 
font-size: 80px; 
 
} 
 
.Content 
 
{ 
 
height: 600px; 
 
} 
 
} 
 

 
/*1200*/ 
 
@media (min-width: 970px) and (max-width: 1119px) { 
 
#Home, #Stock, #AboutUs, #ContactUs 
 
{ 
 
padding-bottom: 25px; 
 
position: relative; 
 
top: -310px; 
 
font-size: 60%; 
 
}} 
 
}
<!DOCTYPE html> 
 
<html> 
 
    <head> 
 
    <meta name="generator" 
 
    content="HTML Tidy for HTML5 (experimental) for Windows https://github.com/w3c/tidy-html5/tree/c63cc39" /> 
 
    <meta charset="utf-8" /> 
 
    <meta name="viewport" content="width=device-width, initial-scale=1" /> 
 
    <link rel="stylesheet" href="Styles.css" /> 
 
    <!--Main Style Sheet--> 
 
    <link rel="stylesheet" href="bootstrap.min.css" /> 
 
    <!--Bootstrap Style Sheet--> 
 
    <link href='https://fonts.googleapis.com/css?family=Permanent+Marker' rel='stylesheet' type='text/css' /> 
 
    <link href='https://fonts.googleapis.com/css?family=Press+Start+2P' rel='stylesheet' type='text/css' /> 
 
    <link href='https://fonts.googleapis.com/css?family=Rokkitt' rel='stylesheet' type='text/css' /> 
 
    <link href='https://fonts.googleapis.com/css?family=Didact+Gothic' rel='stylesheet' type='text/css' /> 
 
\t <!--Fonts--> 
 
\t <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> 
 
\t <script type="text/javascript" src="http://malsup.github.com/jquery.cycle.all.js"></script> 
 
\t 
 
<script type="text/javascript"> <!--Image Fade Script--> 
 
$(document).ready(function() { 
 
    $('.Slot').cycle({ 
 
\t \t fx: 'fade' 
 
\t }); 
 
}); 
 
</script> 
 
\t 
 
\t <title>Retro Games Arcade</title> 
 
    </head> 
 
    
 
    <body> 
 
    <div id="Backg"> 
 
     <div id="PrimaryC" class="container"> 
 
     <!--Primary Container--> 
 
     <div id="Header"> 
 
      <!--Site Logo--> 
 
     </div> 
 
     <div class="Content"> 
 
      <!--Main Content Container--> 
 
      <div class="row"> 
 
      <!--Row 1--> 
 
      <div class="col-sm-6"> 
 
       <!--Left Col--> 
 
       <img src="Graphics/Arcade.png" id="Arcade" class="hidden-xs" /> 
 
       <div class="caption post-content"> 
 
       <div id="Home">home</div> 
 
       <!--Home Button--> 
 
       <div id="Stock">stock</div> 
 
       <!--Stock Button--> 
 
       <div id="AboutUs">about us</div> 
 
       <!--About Us Button--> 
 
       <div id="ContactUs">contact us</div> 
 
       <!--Contact Us Button--> 
 
       </div> 
 

 
\t \t \t </div> 
 
      <div class="col-sm-6" id="RightRow"> 
 
       <!--RightCol--> 
 
       <p id="HeaderText">Welcome to the Retro Games Arcade</p> 
 
       <p id="RegularText"> 
 
       <span class="dropcap">H</span>ere you can find a treasure of Retro Video Games, sell your unwanted hardware/software; 
 
       and also have our professional team repair any damaged hand-held gaming devices. 
 
       <br /> 
 
       <br />We have one of the biggest collectecions of Retro Video Games in the UK, and have genres ranging from Puzzle 
 
       Games and Platformers, to Roleplaying Games and Stratgey Games. 
 
       <br /> 
 
       <br />Our staff have over 100 years combined experience of playing retro video games and a professional certified 
 
       Nintendo technician, so if you want a recommendation for your 
 
       <br />sons birthday present, or you need to get your old GameCube repaired; we are your guys.</p> 
 
      </div> 
 
      </div> 
 
\t \t 
 
\t \t 
 
\t \t \t <div class="col-md-6"> 
 
\t \t \t <div id="slideshow" class="centerBlock hidden-xs hidden-sm hidden-md"> 
 
\t \t \t 
 
\t \t \t <div class="Slot"> 
 
\t \t \t <img class="img-responsive" src="Graphics/IMG1.png" width="158" height="162"> 
 
\t \t \t <img class="img-responsive" src="Graphics/L1.png" width="158" height="162"> 
 
\t \t \t </div> 
 
\t \t \t 
 
\t \t \t <div class="Slot"> 
 
\t \t \t <img class="img-responsive" src="Graphics/IMG2.png" width="158" height="162"> 
 
\t \t \t <img class="img-responsive" src="Graphics/L2.png" width="158" height="162"> 
 
\t \t \t </div> 
 
\t \t \t 
 
\t \t \t <div class="Slot"> 
 
\t \t \t <img class="img-responsive" src="Graphics/IMG3.png" width="158" height="162"> 
 
\t \t \t <img class="img-responsive" src="Graphics/L3.png" width="158" height="162"> 
 
\t \t \t </div> 
 
      
 
\t \t \t </div> 
 
\t \t </div> 
 
\t \t </div> 
 
     <div class="row"> 
 
      <!--Row 3--> 
 
      <div class="col-md-12"> 
 
      <img src="Graphics/Aracde3.png" id="Vector" class="img-responsive center-block" class="hidden-xs" /> 
 
      </div> 
 
     </div> \t \t \t 
 

 

 

 
\t \t </div> 
 
\t 
 
\t \t 
 
\t \t 
 
\t \t </div> 
 
\t \t 
 
\t \t 
 
\t \t 
 
\t \t 
 
\t \t 
 
\t \t 
 
\t \t 
 
\t \t 
 
\t \t 
 
\t \t 
 
\t \t 
 
\t \t 
 
     
 

 
     <footer class="footer-basic-centered"> 
 
      <p class="footer-company-motto">Expand Your Retro Playground.</p> 
 
      <p class="footer-links"> 
 
      <a href="#">Home</a> · 
 
      <a href="#">Stock</a> · 
 
      <a href="#">About Us</a> · 
 
      <a href="#">Contact Us</a></p> 
 
      <p class="footer-company-name">Retro Games Arcade ɠ2015</p> 
 
     </footer> 
 
     </div> 
 
    </div> 
 
    </body> 
 
</html>

回答

0

很难通过代码来读取,所以我不知道如果我瞄准右侧区域。

我假设你希望这些图片是在网上:

<div class="col-md-6"> 
    <div id="slideshow" class="centerBlock hidden-xs hidden-sm hidden-md"> 
      <div class="Slot"> 
       <img class="img-responsive" src="Graphics/IMG1.png" width="158" height="162"> 
       <img class="img-responsive" src="Graphics/L1.png" width="158" height="162"> 
      </div> 

      <div class="Slot"> 
       <img class="img-responsive" src="Graphics/IMG2.png" width="158" height="162"> 
       <img class="img-responsive" src="Graphics/L2.png" width="158" height="162"> 
      </div> 

      <div class="Slot"> 
       <img class="img-responsive" src="Graphics/IMG3.png" width="158" height="162"> 
       <img class="img-responsive" src="Graphics/L3.png" width="158" height="162"> 
      </div> 
    </div> 
</div> 

只需使用引导:

<div class="col-md-6"> 
    <div class="col-md-4"> 
     *images* 
    </div> 
    <div class="col-md-4"> 
     *images* 
    </div> 
    <div class="col-md-4"> 
     *images* 
    </div> 
</div>