Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在bootsrap中向左对齐和镜像以及向右对齐和镜像描述_Html_Twitter Bootstrap - Fatal编程技术网

Html 如何在bootsrap中向左对齐和镜像以及向右对齐和镜像描述

Html 如何在bootsrap中向左对齐和镜像以及向右对齐和镜像描述,html,twitter-bootstrap,Html,Twitter Bootstrap,在下面提到的代码中,我想把图像放在左边,把描述放在右边,把标题放在上面。 class=“面板主体向左拉动”未给出预期结果 @foreach($index=>$value的事件) {{--echo$events[$index]。$description[$index];--} @endforeach 这就是我在项目中使用bootstrap的网格实现这一点的方法 div class="container"> <div class="row"> <div

在下面提到的代码中,我想把图像放在左边,把描述放在右边,把标题放在上面。 class=“面板主体向左拉动”未给出预期结果

@foreach($index=>$value的事件)


{{--echo$events[$index]。$description[$index];--}
@endforeach

这就是我在项目中使用bootstrap的网格实现这一点的方法

div class="container">
    <div class="row">
      <div class="col-sm-3">
        <div class="img">
          <img src="images/trust.png">
        </div>
      </div>
      <div class="col-sm-8">
        <div class="para1">
          <h3>Need to be sincere</h3>
          <p>These personality types embrace rationality and impartiality, excelling in intellectual debates and scientific or technological fields. They are fiercely independent, open-minded, strong-willed and imaginative.
          Diplomats focus on empathy and cooperation, shining in diplomacy and counselling. People belonging to this type group are cooperative and imaginative, often playing the role of harmonizers in their workplace or social circles.</p>
        </div>
      </div>
    </div>
  </div>
div class=“container”>
需要真诚
这些人格类型具有理性和公正性,擅长智力辩论和科技领域。他们非常独立,思想开放,意志坚强,富有想象力。
外交官注重同理心和合作,在外交和咨询方面表现出色。属于这类群体的人是合作和富有想象力的,经常在工作场所或社交圈中扮演协调者的角色


这就是我在项目中使用bootstrap的网格实现这一点的方法

div class="container">
    <div class="row">
      <div class="col-sm-3">
        <div class="img">
          <img src="images/trust.png">
        </div>
      </div>
      <div class="col-sm-8">
        <div class="para1">
          <h3>Need to be sincere</h3>
          <p>These personality types embrace rationality and impartiality, excelling in intellectual debates and scientific or technological fields. They are fiercely independent, open-minded, strong-willed and imaginative.
          Diplomats focus on empathy and cooperation, shining in diplomacy and counselling. People belonging to this type group are cooperative and imaginative, often playing the role of harmonizers in their workplace or social circles.</p>
        </div>
      </div>
    </div>
  </div>
div class=“container”>
需要真诚
这些人格类型具有理性和公正性,擅长智力辩论和科技领域。他们非常独立,思想开放,意志坚强,富有想象力。
外交官注重同理心和合作,在外交和咨询方面表现出色。属于这类群体的人是合作和富有想象力的,经常在工作场所或社交圈中扮演协调者的角色


您的代码中有一些错误。两个“左拉”元素都应该是同级元素。你可以这样用

<img class="panel-title pull-left" src="image/sample.jpg" class="img-thumbnail img-responsive" alt="Cinque Terre" width="100" height="100" ><div class="panel-body pull-left"><li><h6>Hello World</h6></li></div>
  • 你好,世界

  • 这只是一个建议。你为什么要把李当成迪夫的孩子?李应该是ul的孩子。

    您的代码中有一些错误。两个“左拉”元素都应该是同级元素。你可以这样用

    <img class="panel-title pull-left" src="image/sample.jpg" class="img-thumbnail img-responsive" alt="Cinque Terre" width="100" height="100" ><div class="panel-body pull-left"><li><h6>Hello World</h6></li></div>
    
  • 你好,世界

  • 这只是一个建议。你为什么要把李当成迪夫的孩子?李应该是ul的孩子。

    我会让它成为这样的媒体对象:

    @foreach($events as $index => $value)
    <a href="#" >
        <h4 class="media-heading">{{$events[$index]}}</h4>
            <div class="media">
                 <div class="media-left">
                      <img class="media-object" src="/image/sample.jpg" alt="Cinque Terre" width="100px">
                 </div>
                <div class="media-body">
                    <h6>{{$description[$index]}}</h6>  
                </div>
            </div>
    </a>
    
    @foreach($index=>$value形式的事件)
    
    {{--echo$events[$index]。$description[$index];--}
    @endforeach

    我会将其作为媒体对象,如下所示:

    @foreach($events as $index => $value)
    <a href="#" >
        <h4 class="media-heading">{{$events[$index]}}</h4>
            <div class="media">
                 <div class="media-left">
                      <img class="media-object" src="/image/sample.jpg" alt="Cinque Terre" width="100px">
                 </div>
                <div class="media-body">
                    <h6>{{$description[$index]}}</h6>  
                </div>
            </div>
    </a>
    
    @foreach($index=>$value形式的事件)
    
    {{--echo$events[$index]。$description[$index];--}
    @endforeach

    您可以在JSFIDLE中添加代码吗?您可以在JSFIDLE中添加代码吗?