css inline-blocks和bootstrap网格系统输出 [英] css inline-blocks and bootstrap grid system output

查看:155
本文介绍了css inline-blocks和bootstrap网格系统输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 css 对我的divs进行特定 HTML > bootstrap 3.2 。下面的图片展示了我想得到的结果。



我使用了引导网格系统,使我的页面能够响应并正确显示在小屏幕设备上。这是我试过的代码。我使用

 < div class =container> 
< div class =row>

< div class =col-md-3>
< div class =img>
< img src =>
< / div>
< / div>

< div class =col-md-9>
< div class =row>
< div class =col-md-8>
这是产品名称
< / div>
< div class =col-md-4>
1 230.99
< / div>
< / div>

< div class =row>
< div class =col-md-6>
属性1
< / div>
< div class =col-md-6>
Property 2
< / div>
< / div>
< / div>

< / div>
< / div>


I'm trying to have a specific HTML markup of my divs using css and bootstrap 3.2. The image below demonstrates the result I want to get.

I've used the bootstrap grid system so that my page would be responsive and properly displayed in small screen devices. This is the code I've tried. And I used http://www.bootply.com to test it.

Any ideas how to get the markup ?

<div>
  <div style="display:inline-block; border:1px solid gray; width:150px; height:150px;">
    <img src='' alt="image go here !"/>
  </div>

  <div class="container-fluid" style="display:inline-block;">
    <div class="row" style="border:1px solid gray;">
      <div class="col-md-9">This is the product name</div>
      <div class="col-md-3 text-right">1 230.99</div>
    </div>

    <div class="row" style="display:inline-block; border:1px solid gray;">
      <div class="col-md-6">Property 1</div>
      <div class="col-md-6">Property 2</div>
    </div>
  </div>
</div>

The desired result :

EDIT : The result I get :

解决方案

I've created a Bootply for you.

<div class="container">
    <div class="row">

        <div class="col-md-3">
            <div class="img">
                <img src="">
            </div>
        </div>

        <div class="col-md-9">
            <div class="row">
            <div class="col-md-8">
              This is the product name
            </div>
            <div class="col-md-4">
              1 230.99
            </div>
            </div>

            <div class="row">
            <div class="col-md-6">
              Property 1
            </div>
            <div class="col-md-6">
              Property 2
            </div>
            </div>
        </div>

    </div>
 </div>

这篇关于css inline-blocks和bootstrap网格系统输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆