在HTML5中将div与锚标记链接

时间:2012-12-03 05:06:38

标签: html5 css3

我编码了一个这样的块: HTML:

<a href="#">
    <div class="aw">
        <div class="b1">Text</div>
        <div class="b2">Long Text</div>
        <div class="b3">Text</div>
    </div>
</a>

CSS:

.aw{
  color:#AAA;
  background-color:#EFEFEF;
  width:332px;
  height:58px;
  margin:0 auto;
  border:1px solid #EFEFEF;
}
  .b1{
    display:inline-block;
    height:58px;
    width:58px;
    float:left;
  }
  .b2{
    display:inline-block;
    height:58px;
    width:198px;
    float:left;
    overflow:hidden;
  }
  .b3{
    display:inline-block;
    height:58px;
    width:58px;
    float:right;
  }

我正在使用 overflow:hidden text-overflow:省略号 class = b2

正在发生的事情是一个div( class = b2 )中的文字在一行中显示而没有包装文本。

任何快速帮助/提示?

0 个答案:

没有答案