2013-09-25 2 views
1

ID가 #portfolioGallery 인 Div가 있고 그 Div 안에는 .item 클래스가있는 anther Div가 있습니다. 이제 해당 div의 div 내에 이미지와 anther Div가 있습니다. 정보가 담긴 ... 기본적으로 갤러리를 만들고 있습니다. 여기에서보세요 : www.loaistudio.com 및 포트폴리오 섹션으로 스크롤하여 이미지 위로 마우스를 가져 가세요.이미지 갤러리 Chrome에서만 호버 위에 올려 놓는

Chrome의 모든 부분에서 작동합니다. 당신이 크롬에서 이미지를 떠돌아 다닐 때 점프하기 시작합니다 - 내가 뭘 잘못하고있는 걸까요? 또한 이미지는 여기

은 HTML과 CSS입니다 .... 오버 플로우가 숨겨져있는 경우에도 어떤 이유로 사업부의 .item을 넘쳐 :

<head> 
    <meta charset="utf-8" /> 



    <meta name="viewport" id="viewport" content="width=device-width, minimum-scale=1.0, user-scalable=0, maximum-scale=10.0, initial-scale=1.0" />  

    <link rel="shortcut icon" href="assets/elements/favicon.ico"> 
    <link rel="stylesheet" type="text/css" href="assets/css/reset.css"> 
    <link rel="stylesheet" type="text/css" href="assets/css/core.css"> 
    <link rel="stylesheet" type="text/css" media="screen and (max-width : 1030px)" href="assets/css/tablets-landscape.css"/> 
    <link rel="stylesheet" type="text/css" media="screen and (max-width : 770px)" href="assets/css/tablets-portrait.css"/> 
    <link rel="stylesheet" type="text/css" media="screen and (max-width : 500px)" href="assets/css/phone.css"/>    
    <!--Libraries--> 
    <script type="text/javascript" src="assets/libraries/jquery.js"></script> 
</head> 

<body> 
    <header><!--Header--> 
     <div id="headerWrapper"> 
      <div id="headerContent"> 

       <div id="headerLogo"> 
        <a href="index.php"><img alt="Logo" src="assets/elements/logo.png"/></a> 
       </div> 

       <nav><ul id="mainMenu"><!--Main Menu--> 
        <li><a href="#Welcome" id="welcome">Home</a></li> 
        <li><a href="#About" id="about">About us</a></li> 
        <li><a href="#Portfolio" id="portfolio">Portfolio</a></li> 
        <li><a href="#Endorsements" id="endorsements">Endorsements</a></li> 
        <li><a href="#Contact" id="contact">Contact us</a></li> 
       </ul></nav> 

      </div> 
     </div> 
    </header> 

    <div id="page"><!--Website Content-->  

     <div id="secondHeader"> 
      <a class="secondHeader-menuButton" href="#">Menu</a> 
      <p id="logo-smallScreen">Spacehopper Design</p> 
     </div> 

     <div id="Welcome" class="wrapperA"><!--Page Content--> 
      <div id="home-sectionA" class="content" > 
       <img src="assets/elements/home-sectionA-background.png"> 
      </div> 
     </div> 

     <div id="About" class="wrapperB"><!--Page Content--> 
      <div id="home-sectionB" class="content" > 
       <img class="replace1" src="assets/elements/home-sectionB-background.png"> 
       <img class="replace2" src="assets/elements/home-sectionB-background2.png"> 
       <div id="home-sectionB-textbox1"> 
        <h3>..</h3><br> 
        <p>We strongly believe that everything begins with an idea, and that there is a big idea hidden in all of us.</p> 
        <p>You may have that Eureka moment, but are unsure how to develop this idea further from an upbeat, design perspective.</p> 
        <p>This is where Spacehopper Design can help. We are a fast, focused and forward-thinking conceptual agency who promise to find an intuitive solution to your design needs. And of course, we’ll have fun doing so.</p> 
        <p>With our wealth of experience in editorial design, print design and branding, we also have a deep knowledge of understanding our target audience requirements, from conceptual stage right through to the final product.</p>​ 
        <p>So make that leap and let’s work together on making your idea a visual treat and a reality!​​​​​</p> 
       </div> 
      </div> 
     </div> 

     <div id="Portfolio" class="wrapperA custom"><!--Page Content--> 
      <div id="home-sectionC" class="content" > 
       <img class="replace1" src="assets/elements/home-sectionC-background.png"> 
       <h1 class="replace2">Check out our Work!</h1> 

       <div id="portfolioGallery"> 

        <div class="item"> 
         <img alt="" src="assets/images/audiobullys.jpg"> 
         <div> 
          <h3>Title</h3> 
          <p>Disruption Disruption Disruption</p> 
         </div> 
        </div> 

        <div class="item"> 
         <img alt="" src="assets/images/audiobullys.jpg"> 
         <div> 
          <h3>Title</h3> 
          <p>Disruption Disruption Disruption</p> 
         </div> 
        </div> 

        <div class="item"> 
         <img alt="" src="assets/images/audiobullys.jpg"> 
         <div> 
          <h3>Title</h3> 
          <p>Disruption Disruption Disruption</p> 
         </div> 
        </div> 

        <div class="item"> 
         <img alt="" src="assets/images/audiobullys.jpg"> 
         <div> 
          <h3>Title</h3> 
          <p>Disruption Disruption Disruption</p> 
         </div> 
        </div> 

        <div class="item"> 
         <img alt="" src="assets/images/nta2.jpg"> 
         <div> 
          <h3>Title</h3> 
          <p>Disruption Disruption Disruption</p> 
         </div> 
        </div> 

        <div class="item"> 
         <img alt="" src="assets/images/look.jpg"> 
         <div> 
          <h3>Title</h3> 
          <p>Disruption Disruption Disruption</p> 
         </div> 
        </div> 

        <div class="item"> 
         <img alt="" src="assets/images/open-bookheat.jpg"> 
         <div> 
          <h3>Title</h3> 
          <p>Disruption Disruption Disruption</p> 
         </div> 
        </div> 

       </div> 
      </div> 
     </div> 

     <div id="Endorsements" class="wrapperB"><!--Page Content--> 
      <div id="home-sectionD" class="content" > 

       <div class="home-sectionD-textbox"> 
        <h3>Reesa Amadeo Wolf: Entrepreneur MD at Fresh Young Media </h3> 
        <p>We knew Srt of the bigger vision for what we do assion for what we do assion for what we do assion for what weas a social enterprise. We will be working with Spacehopper Design for a long time!</p> 
       </div> 

       <div class="home-sectionD-textbox"> 
        <h3>Reesa Amadeo Wolf: Entrepreneur MD at Fresh Young Media </h3> 
        <p>We knew Srt of the bigger vision for what we do assion for what we do assion for what we do assion for what weas a social enterprise. We will be working with Spacehopper Design for a long time!</p> 
       </div> 

       <div class="home-sectionD-textbox"> 
        <h3>Reesa Amadeo Wolf: Entrepreneur MD at Fresh Young Media </h3> 
        <p>We knew Srt of the bigger vision for what we do assion for what we do assion for what we do assion for what weas a social enterprise. We will be working with Spacehopper Design for a long time!</p> 
       </div> 

       <div class="home-sectionD-textbox"> 
        <h3>Reesa Amadeo Wolf: Entrepreneur MD at Fresh Young Media </h3> 
        <p>We knew Srt of the bigger vision for what we do assion for what we do assion for what we do assion for what weas a social enterprise. We will be working with Spacehopper Design for a long time!</p> 
       </div> 

       <div class="home-sectionD-textbox"> 
        <h3>Reesa Amadeo Wolf: Entrepreneur MD at Fresh Young Media </h3> 
        <p>We knew Srt of the bigger vision for what we do assion for what we do assion for what we do assion for what weas a social enterprise. We will be working with Spacehopper Design for a long time!</p> 
       </div> 

       <div class="home-sectionD-textbox"> 
        <h3>Reesa Amadeo Wolf: Entrepreneur MD at Fresh Young Media </h3> 
        <p>We knew Srt of the bigger vision for what we do assion for what we do assion for what we do assion for what weas a social enterprise. We will be working with Spacehopper Design for a long time!</p> 
       </div> 

       <div class="home-sectionD-textbox"> 
        <h3>Reesa Amadeo Wolf: Entrepreneur MD at Fresh Young Media </h3> 
        <p>We knew Srt of the bigger vision for what we do assion for what we do assion for what we do assion for what weas a social enterprise. We will be working with Spacehopper Design for a long time!</p> 
       </div> 

       <img src="assets/elements/home-sectionD-background.png"> 
      </div> 
     </div>  

     <div id="Contact" class="contactSectionWrapper"><!--Page Content--> 
      <div id="contactSection" class="content" > 

       <h2>Want to Get in Touch?</h2>    

       <div id="grid1"> 
        <form id="contactForm" action="email.php" method="post"> 
         <label for="name">Your Name</label> 
         <input class="input" id="name" type="text" required placeholder="Enter Name"> 

         <label for="email">Email Address</label> 
         <input class="input" id="email" type="email" required placeholder="Enter Email"> 

         <label for="message">Message</label> 
         <textarea class="input" id="message" required></textarea> 

         <button id="submit" type="submit">Send</button> 
        </form> 

        <div id="contact-info"> 
         <p><strong>Email:</strong> [email protected]</p> 
         <p><strong>Telephone:</strong> +44 0 745326 2993</p> 
         <p><strong>Skype:</strong> Loai.Bassam</p> 
        </div> 
         <br> 
        <div class="socialbar icons"> 
         <a href="https://www.facebook.com/LOAI.Design.Studio" class="facebook" target="_blank"><span>Facebook</span></a> 
         <a href="https://twitter.com/LoaiBassam" class="twitter" target="_blank"><span>Twitter</span></a> 
         <a href="http://uk.linkedin.com/in/loaibassam" class="linkedin" target="_blank"><span>Linkedin</span></a> 
        </div> 
       </div> 

       <div id="grid2"> 
        <img alt="" src="assets/elements/map.png" id="map"> 
       </div>  

      </div> 
     </div> 

     <footer id="footer"><!--Footer Section--> 
      <div id="footerContent"> 
       <p>Copyright ©2013 Spacehopper Design. All rights reserved.</p><a href="http://www.loaidesign.co.uk" target="_blank"style="padding-top: 20px;">Website Designed By<img style="display: inline-block; margin-left: 5px; vertical-align: middle;" alt="loai design studio responsive website design" src="assets/elements/loaidesignstudio-logo.png"></a> 
      </div> 
     </footer> 

    </div><!--The End Of The Page-->  
    <!--Scripts Links--> 
    <script type="text/javascript" src="assets/js/slider.js"></script> 
    <script type="text/javascript" src="assets/js/main.js"></script> 
    <script src="assets/libraries/modernizr.js"></script> 
    <script>var snapper = new Snap({ 
</body> 

body { 
    background-color: #FFFFFF; 

    line-height: 125%; 
    text-align: center; 
    overflow-x: hidden; 

    -webkit-text-size-adjust: none; 
    -webkit-overflow-scrolling: touch; 
} 

/*Font Face*/ 
@font-face { font-family: Comfortaa; src: url('Comfortaa-Light.ttf'); } 
@font-face { font-family: Comfortaa; font-weight: bold; src: url('Comfortaa-Bold.ttf');} 
/*Fonts*/h1, h2, h3, h4, h5, h6, p, pre, a, ol, li, span, label, blockquote, figcaption, abbr, td, input, textarea { 
    font-family: Comfortaa, sans-serif; 
    font-size: 15px; 
    color: #636363; 
} 

h1 { 
    color: #FFFFFF; 
    font-size: 26px; 
    line-height: 120%; 
    font-weight: bold; 
} 

h2 { 
    font-size: 26px; 
    line-height: 120%; 
    font-weight: bold; 
} 

h3 { 
    font-size: 20px; 
    font-weight: bold; 
} 

small { 
    font-size: 13px; 
} 

strong { 
    font-weight: bold; 
} 

em { 
    font-style: italic; 
} 

img { 
    display: block; 
} 


/*MAIN/////////////////////////////////////////////////////////////////////*/ 
/*Main Page*/#page {  
    width: 100%; 
    position: relative; 
    padding-top: 103px; 
    overflow: hidden; 
} 

/*Wrappers*/.wrapper, .wrapperA, .wrapperB, .contactSectionWrapper { width: 100%; overflow: hidden; } 

    .wrapper { 
     background-color: #FFFFFF; 
    } 

    .wrapperA { 
     background-color: #F58221; 
    } 

    .wrapperB { 
     background-color: #23408E; 
    } 

/*Content Container*/.content { 
    width: 1030px; 
    padding: 0 20px; 
    margin: auto; 
    overflow: hidden; 
} 

/*HEADER///////////////////////////////////////////////////////////////////*/ 
/*Header Wrapper*/#headerWrapper { 
    background-color: #ffffff; 
    width: 100%; 
    position: fixed; 
    top: 0; left: 0; 
    z-index: 1000; 

    -webkit-box-shadow: 0px 0px 25px -1px rgba(0,0,0,0.3); 
    -moz-box-shadow: 0px 0px 25px -1px rgba(0,0,0,0.3); 
    box-shadow: 0px 0px 25px -1px rgba(0,0,0,0.3); 
} 

/*Header Content Container*/#headerContent { 
    width: 1030px; 
    padding: 10px 20px; 
    margin: auto; 
} 

/*Header Logo*/#headerLogo { 
    width: 300px; 
    float: left; 
} 

/*Main Menu*/#mainMenu { 
    margin-top: 20px; 
    float: right; 
} 

    #mainMenu li { 
     float: left; 
    } 

    #mainMenu a { 
     color: #F58221; 

     padding: 10px 15px; 
     margin-left: 5px; 

     border-radius: 3px; 
     -moz-border-radius: 3px; 
     -webkit-border-radius: 3px; 

     -webkit-transition: background 0.1s linear; 
     -moz-transition: background 0.1s linear; 
     -ms-transition: background 0.1s linear; 
     -o-transition: background 0.1s linear; 
     transition: background 0.1s linear; 
    } 

    #mainMenu a:hover { 
     color: #23408E; 
    } 

    #mainMenu a.active { 
     color: #ffffff; 
     background-color: #23408E; 
     cursor: default; 
    } 

/*Tablet & Phone Header (Hidden From Widescreen's)*/ 
.secondHeader-menuButton, #secondHeader, #logo-smallScreen { 
    display: none; 
} 



/*FOOTER////////////////////////////////////////////////////////////////////*/ 
/*Footer Section*/ 
#footer { 
    border-top: 1px solid #192E66; 
    background-color: #23408E; 
    width: 100%; 
} 

#footerContent { 
    width: 1030px; 
    padding: 20px; 
    margin: auto; 
    overflow: hidden; 
} 

    #footerContent * { 
     color: #FFFFFF; 
     font-size: 13px; 
    } 


/*Replacement Content////////////////////////////////////////////////////////*/ 
.replace2 { 
    display: none; 
} 


/*PAGES////////////////////////////////////////////////////////////////////*/ 
/*About Page*/ 
#home-sectionB { 
    position: relative; 
} 

    #home-sectionB-textbox1 { 
     width: 500px; 
     max-width: 100%; 

     position: absolute; 
     bottom: 135px; 
     right: 50px; 

     text-align: justify; 
    } 

     #home-sectionB-textbox1 p, h3 { 
      color: #FFFFFF; 
     } 




/*Portfolio Page*/ 
.custom { 
    background-image: url('../elements/bites.png'); 
    background-repeat: no-repeat; 
    background-position: right bottom; 
} 

#home-sectionC { 
    padding-bottom: 50px; 
} 

    #portfolioGallery * { 
     color: #FFFFFF; 
    } 

#portfolioGallery .item { 
    border: 1px dashed #FFFFFF; 
    width: 310px; height: 250px; 
    display: inline-block; 
    margin: 5px; 
    overflow: hidden; 
    cursor: pointer; 

    border-radius: 5px; 
    -moz-border-radius: 5px; 
    -webkit-border-radius: 5px; 
} 

    #portfolioGallery .item div { 
     background-color: #23408E; 
     width: 100%; height: 100%; 
     padding: 100px 20px 20px 20px; 
    } 

    #portfolioGallery .item img { 
     max-width: 380px; 
    } 

     #portfolioGallery .item:hover > img { 
      display: none; 
     } 



/*Endorsements*/  
#home-sectionD { 
    padding-top: 50px; 
} 

.home-sectionD-textbox * { 
    color: #FFFFFF; 
} 

.home-sectionD-textbox { 
    padding: 30px; 
    text-align: left; 
    clear: both; 
} 

    .home-sectionD-textbox:last-of-type { 
     padding: 30px 30px 0 30px; 
    } 

    .home-sectionD-textbox:before { 
     content: url('../elements/quote.png'); 
     padding-right: 20px; 
     float: left; 
    } 



/*Contact Page*/ 
.contactSectionWrapper { 
    background-color: #FFFFFF; 
    background-image: url('../elements/strip.png'); 
    background-repeat: repeat-x; 
    background-position: top; 
    padding: 50px 0; 
} 

#contactSection h2 { 
    color: #F58221; 
    padding-top: 50px; 
    font-size: 5em; 
} 

#grid1 { 
    width: 40%; 
    vertical-align: middle; 
    display: inline-block; 
    margin-left: -2px; 
    padding: 50px 0; 
} 

#grid2 { 
    width: 60%; 
    vertical-align: middle; 
    display: inline-block; 
    margin-left: -2px; 
    padding: 0 0 0 50px;  
} 

    #contactForm label{ 
     color: #23408E; 
     display: block; 
     padding: 10px 0; 
     text-align: left; 
    } 

    #contactForm input, 
    #contactForm textarea {  
     width: 100%; 
     display: block; 
     padding: 10px 10px; 
     margin-bottom: 15px; 

     text-align: left; 
     outline: none; 

     border-radius: 5px; 
     -moz-border-radius: 5px; 
     -webkit-border-radius: 5px; 
    } 

    #contactForm textarea{ 
     resize: vertical; 
    } 

    #submit{ 
     color: #FFFFFF; 
     background: #23408E; 
     border: none; 

     width: 100%; 
     padding: 10px 10px; 

     cursor: pointer; 
     font-size: 15px; 

     border-radius: 5px; 
     -moz-border-radius: 5px; 
     -webkit-border-radius: 5px; 
    } 

    #submit:hover, 
    #submit:active { 
     background: #F58221; 
    } 

.notSelected { 
    color: #B2B2B2; 
    border: 1px solid #23408E; 
} 

.selected { 
    color: #F58221; 
    border: 1px solid #F58221; 
} 

#contact-info { 
    padding-top: 40px; 
} 



/*Social Media Icons*/ 
.socialbar { 
    padding-top: 5px; 
    display: inline-block; 
    cursor: default; 
} 

    .icons a { 
     background-image:url("../elements/socialmediaicons.png"); 
     background-repeat: no-repeat; 

     display: inline-block; 
     height: 40px; 
     width: 40px; 

     border-radius: 5px; 
     -moz-border-radius: 5px; 
     -webkit-border-radius: 5px;  
    } 

     .icons a span { 
      display: none; 
     } 

    .icons a.facebook { background-position: 0 -160px; } 
    .icons a.facebook:hover { background-position: 0 -200px; } 

    .icons a.linkedin { background-position: 0 -720px; } 
    .icons a.linkedin:hover { background-position: 0 -760px; } 

    .icons a.twitter { background-position: 0 -1520px; } 
    .icons a.twitter:hover { background-position: 0 -1560px; } 

답변

0

귀하 .item 요소는 display: inline-block이지만 .item img 요소는 display: block입니다.

따라서 마우스를 움직일 때 display: blockinline-block 요소를 번갈아 가며이 두 가지 디스플레이 유형이 세로 축의 중심에 다르게 표시됩니다.

이미지가 항상 inline-block인지 확인하는 CSS 규칙을 사용해보십시오.

#portfolioGallery .item img { display: inline-block; } 
+0

그러나 이미지를 인라인 블록으로 표시하면 아래쪽 여백이 생깁니다. 그 마진을 없애려면 어떻게해야합니까? 내가 아는 유일한 방법은 블록으로 표시하는 것입니다 ... –

관련 문제