如何用CSS3实现这个?

时间:2015-03-25 07:06:45

标签: css css3

CSS专家可以帮助我实现一个给我这个设计的css文件。

enter image description here

2 个答案:

答案 0 :(得分:0)

要么提供更多规格,要么就是:



  .left {
    max-width: 150px;
    background-color: red;
    display: inline-block;
    vertical-align: top;
  }
  .right {
    background-color: blue;
    display: inline-block;
    vertical-align: top;
  }

<div class="page">
  <div class="left">
    <div style="border:1px solid black; margin-bottom:5px;">Photo</div>
    <div style="border:1px solid black; ">Div 3</div>
  </div>
  <div class="right">
    <div style="border:1px solid black; margin-bottom:5px;">Div 1</div>
    <hr>
    <div style="border:1px solid black;">Div 2</div>
    <div style="border:1px solid black;">Div 4</div>
  </div>
</div>
&#13;
&#13;
&#13;

答案 1 :(得分:0)

这是一些可以提供帮助的东西。 http://jsfiddle.net/mf36nLrt/

&#13;
&#13;
.photo, .div3{
    width: 75px;
    height: 90px;
    border: 1px solid #d5d5d5;
    float: left;
}

.div1, .div2, .hr, .div4 {
    float: left;
    width: calc(100% - 85px); /* Here 85 is the width of PHOTO + margin + border */
    margin-left: 5px; /*Adjust this value for the space between photo and DIV#1 */
    border: 1px solid #d5d5d5;
    height: 50px;
}

.hr{
    border: none;
    border-bottom: 1px solid #d5d5d5;
    margin-top: 5px;
    height: 0px;
}

.div2{
    margin-top: 5px;
    height: 30px;
}

.div3{
    margin-top: 5px;    
}

.div4{
    height: 90px;
    margin-top: 5px;
}
&#13;
<div>
    <div>
        <div class="photo"></div>
        <div class="div1"></div>
        <div class="hr"></div>
        <div class="div2"></div>
    </div>
    <div>
        <div class="div3"></div>
        <div class="div4"></div>
    </div>
</div>
&#13;
&#13;
&#13;