【问题标题】:Rounded images connected with lines bootstrap与线引导连接的圆形图像
【发布时间】:2019-06-28 22:26:18
【问题描述】:

我正在尝试如下布局:

Here is what i tried doing to achieve same

我不知道如何在引导程序中将蓝色圆圈与圆形图像对齐并将文本放在行的顶部,例如。虚线上方的“您的客户”。

【问题讨论】:

  • 只有3张图片??
  • @XenioGracias 是的
  • 我已经添加了一个答案。请检查。

标签: html css twitter-bootstrap user-interface bootstrap-4


【解决方案1】:

我已经使用伪元素来实现它。请参考以下链接。谢谢

https://codepen.io/Xenio/pen/xMLLdL999

【讨论】:

  • 感谢 Xenio。您是否还可以添加如何在有问题的屏幕截图中添加围绕图像的圆圈以及如何将文本人名文本居中?
  • 立即查看链接
  • 我可以看到和以前一样的内容。 NVM,另一个答案已经解决了这个问题。感谢您的帮助!
  • 关于如何将整个 div 保持在中心的任何指示(我已将其包装成一行)。此外,如果我在行首添加句子,它会与其他文本重叠。图像的文本标签也不居中。
  • @Mayur Bhangale 检查链接。我已经更新了我的答案
【解决方案2】:

@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  font-family: lato;
}
.section-header, .steps-header, .steps-name {
  color: #3498db;
  font-weight: 400;
  font-size: 1.4em;
}
.steps-header {
  margin-bottom: 20px;
  text-align: center;
}
.steps-timeline {
  outline: 1px dashed rgba(255, 0, 0, 0);
}
.step-box {
    position: relative;
}
.border-info {
    position: absolute;
    top: -12px;
    right: -41%;
}
@media screen and (max-width: 500px) {
  .steps-timeline {
    border-left: 2px solid #3498db;
    margin-left: 25px;
  }
}
@media screen and (min-width: 500px) {
  .steps-timeline {
    border-top: 2px solid #3498db;
    padding-top: 20px;
    margin-top: 40px;
    margin-left: 16.65%;
    margin-right: 16.65%;
  }
}
.steps-timeline:after {
  content: "";
  display: table;
  clear: both;
}
.steps-one, .steps-two, .steps-three {
  outline: 1px dashed rgba(0, 128, 0, 0);
}
@media screen and (max-width: 500px) {
  .steps-one, .steps-two, .steps-three {
    margin-left: -25px;
  }
}
@media screen and (min-width: 500px) {
  .steps-one, .steps-two, .steps-three {
    float: left;
    width: 33%;
    margin-top: -50px;
  }
}
@media screen and (max-width: 500px) {
  .steps-one, .steps-two {
    padding-bottom: 40px;
  }
}
@media screen and (min-width: 500px) {
  .steps-one {
    margin-left: -16.65%;
    margin-right: 16.65%;
  }
}
@media screen and (max-width: 500px) {
  .steps-three {
    margin-bottom: -100%;
  }
}
@media screen and (min-width: 500px) {
  .steps-three {
    margin-left: 16.65%;
    margin-right: -16.65%;
  }
}
.steps-img {
  display: block;
  margin: auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #3498db;
}
@media screen and (max-width: 500px) {
  .steps-img {
    float: left;
    margin-right: 20px;
  }
}
.steps-name, .steps-description {
  margin: 0;
}
@media screen and (min-width: 500px) {
  .steps-name {
    text-align: center;
  }
}
.steps-description {
  overflow: hidden;
}
@media screen and (min-width: 500px) {
  .steps-description {
    text-align: center;
  }
}
  <!-- STEPS -->
  <section id="Steps" class="steps-section">

    
        <div class="steps-timeline">
    
          <div class="steps-one step-box">
            <img class="steps-img" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTyznUM3fo7JW5RskOyxZqC0sGMtn6AdNB8Y3lVey8cdfl0ZnmW" alt="" />
            <h3 class="steps-name">
              John Doe
            </h3>
            <p class="steps-description">
                    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
            </p>
            <div class="border-info">
                <p>Your Customer</p>
            </div>
          </div>
    
          <div class="steps-two step-box">
            <img class="steps-img" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTyznUM3fo7JW5RskOyxZqC0sGMtn6AdNB8Y3lVey8cdfl0ZnmW" alt="" />
            <h3 class="steps-name">
                    John Doe
            </h3>
            <p class="steps-description">
                    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
            </p>
            <div class="border-info">
                    <p>Your Customer</p>
                </div>
          </div>
    
          <div class="steps-three step-box">
            <img class="steps-img" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTyznUM3fo7JW5RskOyxZqC0sGMtn6AdNB8Y3lVey8cdfl0ZnmW" alt="" />
            <h3 class="steps-name">
                    John Doe
            </h3>
            <p class="steps-description">
                    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
            </p>
          </div>
    
        </div><!-- /.steps-timeline -->
    
      </section>

【讨论】:

    【解决方案3】:

    试试这个:

    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"></script>
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet"/>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <style>
    #dotted::after{
              content: "------------------------------";
              letter-spacing: 2px;
              color:#2518A5;
    }
    </style>
    
    <div class="col mini-box ml-4" >
                      <div class="row" style="position: relative !important; width: 1000px;">
                        <div style="display: inline">
                            <div id="dotted"><img class="rounded pull-right" src="assets/ic_AvatarMale_2.svg" width="85" height="85"></img>
                            </div>  
                            <div class="mt-2 text-left"><h6 style="font-weight: 700; color: #2518A5 ">John Doe (You)</h6>
                            <h6>Founder</h6>
                            <h6>ESOP International</h6>
                            </div>
                        </div>
                      <span style="text-align: center; font-size:10pt;position: absolute; right:750px; top: 10px; display: inline-block">Your Company</span>
        <span style="position: absolute;text-align: center; font-size:10pt; right:370px; display: inline-block">Nathan was co founder &  <br/>COO at HotelsByDay</span>
                    <div style="display: inline-block">
                            <div id="dotted"><img class="rounded pull-right" src="assets/ic_AvatarMale_1.svg" width="85" height="85"></img>
                            </div>   
                            
                            <div class="mt-2 "><h6 style="font-weight: 700; color: #2518A5 ">Paul Ironside</h6>
                              <h6>Co-founder and CEO</h6>
                              <h6>Commercial Tribe</h6>
                            </div>
                        </div>
                        <img class="rounded pull-right" src="assets/ic_AvatarMale_1.svg" width="85" height="85">
                    </div>
                  </div>

    【讨论】:

      猜你喜欢
      • 2021-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-12
      • 2014-04-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多