首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >地平线卷轴问题

地平线卷轴问题
EN

Stack Overflow用户
提问于 2014-04-08 12:06:19
回答 1查看 44关注 0票数 0

我正在创建这个网页,其中有几个部分是垂直滚动。每个区域的高度都是100%,所以在视口中每一段时间都有一个部分。现在,我想要实现oposite效应,因为每个部分应该有两个部分,应该是水平滚动(每个100%的宽度)。

例如。在jsFiffle中,第一部分有两个带有标题的div:

我们的总部在地点

We2以位置为基础

代码语言:javascript
复制
<!-- section I -->
    <div class="section row">
      <div class="section-content">
        <h2>We are company</h2>
        <p>We are a digital marketing agency based on Hong Kong, founded in 2010.</p>
        <p>We help brands be digital by providing a range of related services including: design & branding, web development, digital communications, social media, and online advertising.  We live all around the world and call ourselves account analysts and managers, designers, developers, project managers and friends and teammates.  We have helped clients big and small, with both shot-term and yearly retainer project work.  We are always interested to grow our knowledge and experience.</p>
        <p>Thank you for visiting our website.</p>
      </div>

      <div class="second-content">
        <h2>We2 are company</h2>
        <p>We are a digital marketing agency based on Hong Kong, founded in 2010.</p>
        <p>We help brands be digital by providing a range of related services including: design & branding, web development, digital communications, social media, and online advertising.  We live all around the world and call ourselves account analysts and managers, designers, developers, project managers and friends and teammates.  We have helped clients big and small, with both shot-term and yearly retainer project work.  We are always interested to grow our knowledge and experience.</p>
        <p>Thank you for visiting our website.</p>
      </div>
    </div>
    <!-- end section I -->

这是我的jsFiffle(不是很好,因为我使用的是基金会)

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-04-08 12:21:03

如果我对你的理解是正确的,你想要的东西如下:

http://jsfiddle.net/8Dz9n/

代码语言:javascript
复制
<div class="section">
    <div class=" row">
        <div class="section-content">
            <h2>We are company</h2>
            <p>We are a digital marketing agency based on Hong Kong, founded in 2010.</p>
            <p>We help brands be digital by providing a range of related services including: design & branding, web development, digital communications, social media, and online advertising.  We live all around the world and call ourselves account analysts and managers, designers, developers, project managers and friends and teammates.  We have helped clients big and small, with both shot-term and yearly retainer project work.  We are always interested to grow our knowledge and experience.</p>
            <p>Thank you for visiting our website.</p>
        </div>

        <div class="second-content">
            <h2>We2 are company</h2>
            <p>We are a digital marketing agency based on Hong Kong, founded in 2010.</p>
            <p>We help brands be digital by providing a range of related services including: design & branding, web development, digital communications, social media, and online advertising.  We live all around the world and call ourselves account analysts and managers, designers, developers, project managers and friends and teammates.  We have helped clients big and small, with both shot-term and yearly retainer project work.  We are always interested to grow our knowledge and experience.</p>
            <p>Thank you for visiting our website.</p>
        </div>
    </div>
</div>

CSS

代码语言:javascript
复制
.section {height:100%; width:100%;}
.row {width:200%; height:100%;}
.section-content, .second-content  {float:left; height:100%; width:50%; background:red;}
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22936519

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档