在css溢出:可见不起作用。内容被剪裁

时间:2016-09-25 20:31:13

标签: css twitter-bootstrap-3



.site_title {
  /*text-overflow: ellipsis;*/
  overflow: visible;
  font-weight: 400;
  font-size: 22px;
  width: 100%;
  color: #ECF0F1 !important;
  margin-left: 150px !important;
  line-height: 59px;
  display: block;
  height: 55px;
  margin: 0;
  padding-left: 10px;
}

<div class="navbar nav_title" style="border: 0;">
  <a href="index.html" class="site_title">
    <i class="fa fa-paw"></i>  <span>Gentellela Alela!</span>
  </a>
</div>
&#13;
&#13;
&#13;

如果溢出,我想让内容可见。我已经设置了overflow:visible但仍会额外删除内容。

1 个答案:

答案 0 :(得分:0)

你的意思是这样吗?

.site_title {
  /*text-overflow: ellipsis;*/
  overflow: visible;
  font-weight: 400;
  font-size: 22px;
  width: 100%;
  color: #ECF0F1 !important;
  line-height: 59px;
  display: block;
  height: 55px;
  margin: 0;
  padding: 0;
}
<div class="navbar nav_title" style="border: 0;">
  <a href="index.html" class="site_title">
    <i class="fa fa-paw"></i>  <span>Gentellela Alela!</span>
  </a>
</div>