RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / 问题 / 863393
Accepted
Nulliza
Nulliza
Asked:2020-08-02 16:27:32 +0000 UTC2020-08-02 16:27:32 +0000 UTC 2020-08-02 16:27:32 +0000 UTC

如何使用示例使 flexbox 移动?

  • 772

我还没有完全弄清楚 flexbox,我不知道如何让信息框在移动设备上缩放或打开时向左移动。如何才能做到这一点?

怎么做

* {
  margin: 0; 
  padding: 0;
}
body {  
  background-color: #f2f2f2;
  font-family: "Futura PT", sans-serif;
  -webkit-font-smoothing: antialiased;
  /* для корректного отображения текста на всех экранах*/
  -webkit-overflow-scrolling: touch;
  /*для нормального скроллинга*/
}
.header-top {
   height:40px;
    background: #ffffff;
    line-height:40px;    
}
main{
  display: flex;
  flex-direction: column;
  width: 90%;
}

main .top-slide{
  background: url(img/Чуваки.png);
  width: 1240px;
  height: 376px;
  margin-top: 5%;
  margin-left: 5%; 
  margin-right: 5%;
  margin-bottom: 5%;
  display: block;
  vertical-align: middle;
}

.box-white{
  background-color: #ffffff;
  width: 292px;
  height: 292px;  
  position: absolute;
  margin-top: 42px;
  margin-left: 860px; 
  margin-right: 86px;
  margin-bottom: 42px;
}

.first-p{
  width: 262px;
  height: 37px;
  color: #5497cc;
  font-family: "Futura PT";
  font-size: 20px;
  font-weight: 300;
  position: absolute;
  margin-top: 18px;
  margin-right: 16px;  
  margin-bottom: 243px;
  margin-left: 14px; 
}

.cool-p{
  width: 262px;
  height: 59px;
  color: #000000;
  font-family: "Futura PT";
  font-size: 20px;
  font-weight: 600;
  position: absolute;
  margin-top: 48px;   
  margin-right: 15px;
  margin-bottom: 185px;
  margin-left: 15px;
}
.third-p{
  width: 262px;
  height: 86px;
  color: #000000;
  font-family: "Futura PT";
  font-size: 16px;
  font-weight: 300;
  position: absolute;
  margin-top: 119px;   
  margin-right: 15px;
  margin-bottom: 87px;
  margin-left: 15px;
}
.read-more-p a{  
  width: 95px;
  height: 37px;
  color: #5497cc;
  font-family: "Futura PT";
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  position: absolute;
  margin-top: 253px;   
  margin-right: 51px;
  margin-bottom: 2px;
  margin-left: 146px;
}
.read-more-p img{
  position: absolute;
  margin-top: 257px;   
  margin-right: 31px;
  margin-bottom: 23px;
  margin-left: 247px;
}
<header>
  <div class="header-top">
    Header top
  </div>
</header>
<div id="container" style="width:1366px;margin:0 auto;">
  <!-- С помощью этого кода мы центрируем сайт-->	
<main>
<section class="top-slide">
  <section class="box-white">
    <p class="first-p">Головне</p>
    <p class="cool-p">Тут буде також дуже крутий заголовок</p>
    <p class="third-p">Integer quis interdum libero. Praesent et ante et dolor tincidunt semper. Nulla id nibh vel metus molesti</p>
    <p class="read-more-p"><a href="#">Читати далі</a><img src="img/arrow.png" alt="arrow"></p>				
  </section>
</section>

html
  • 1 1 个回答
  • 10 Views

1 个回答

  • Voted
  1. Best Answer
    Vlad
    2020-08-10T02:03:50Z2020-08-10T02:03:50Z

    我了解您需要将框移到移动屏幕上的左侧。

    @media(max-width: 991px) {
        .content {
            justify-content: flex-start;
        }
    }
    

    这是一个可以帮助您理解 flex 的游戏:http: //flexboxfroggy.com/#ru

    • 1

相关问题

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    是否可以在 C++ 中继承类 <---> 结构?

    • 2 个回答
  • Marko Smith

    这种神经网络架构适合文本分类吗?

    • 1 个回答
  • Marko Smith

    为什么分配的工作方式不同?

    • 3 个回答
  • Marko Smith

    控制台中的光标坐标

    • 1 个回答
  • Marko Smith

    如何在 C++ 中删除类的实例?

    • 4 个回答
  • Marko Smith

    点是否属于线段的问题

    • 2 个回答
  • Marko Smith

    json结构错误

    • 1 个回答
  • Marko Smith

    ServiceWorker 中的“获取”事件

    • 1 个回答
  • Marko Smith

    c ++控制台应用程序exe文件[重复]

    • 1 个回答
  • Marko Smith

    按多列从sql表中选择

    • 1 个回答
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Suvitruf - Andrei Apanasik 什么是空? 2020-08-21 01:48:09 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5