2016-10-08 48 views
0

我正在尝试制作一个类似于www.the5th.co的网站,它们有两个独立的列。两列都可以滚动但独立。我应该如何开发这样的设计?我需要什么语言?如果可能的话,我正试图在WordPress中实现这个设计。在网页中单独滚动列

感谢您的帮助!

+0

可以在WordPress –

回答

0

首先,我认为你应该获得关于开发网页的编程语言的基本信息,然后再问这个问题,但更准确。为了检查网站检查他们的设计,有几个调试和监视工具,如Firefox的FireBug。一个简单的方法来做这个单独的滚动是使用简单的HTML和CSS。然而,有各种技术来实现这一点。其中之一是如下所示:

body { 
 
    padding: 0; 
 
    margin: 0; 
 
} 
 
#col_container { 
 
    position: absolute; 
 
    width: 100%; 
 
    height: 100%; 
 
} 
 
#col1 { 
 
    float: left; 
 
} 
 
#col2 { 
 
    overflow: hidden; 
 

 
} 
 
#col1, #col2 { 
 
    width: 50%; 
 
    height: 100%; 
 
    overflow: auto; \t 
 
} 
 
.col-content { 
 
    position: relative; 
 
    height: 2000px; 
 
} 
 
.col-content > div { 
 
    width: 60%; 
 
    margin: auto; 
 
    background-color: rgb(200,200,200); 
 
} 
 
.col-content p { 
 
    text-align: center; 
 
    margin: 0 auto; 
 
}
<body> 
 
    <div id="col_container"> 
 
    <div id="col1"> 
 
     <div class="col-content"> 
 
     <div> 
 
      <p>Hallo World!</p> 
 
     </div> 
 
     </div> 
 
    </div> 
 
    <div id="col2"> 
 
     <div class="col-content"> 
 
     <div> 
 
      <p>Hallo World!</p> 
 
     </div> 
 
     </div> 
 
    </div> 
 
    </div> 
 
</body>