html - float 在 bootstrap div 中的垂直文本

标签 html css twitter-bootstrap

我创建了一段代码。在跨度类 mean-head 中,如果跨度的文本增加,则水平增加。我想将它的宽度固定为 30 个字符。在该文本之后转到新行。

EXAMPLE FIEDLE

<span class="top-head"> Recommended URLs </span>
<div class="c1">   
    <div class="item">
        <div class="image"> 
            <img class="media-object" src="http://deathandtaxesmag.wpengine.netdna-cdn.com/wp-content/uploads/2014/02/Screen-Shot-2014-02-27-at-12.39.17-PM.png" >
        </div>
        <div class="descriptionContainer">
            <span class="main-head"> Mashable - Business </span>
            <span class="min-head">Title of link Title of link Title of link Title of link </span>
            <span class="subcont">
                    <span class="fa fa-retweet"> RT 100+ | </span> 
                    <span class="fa fa-twitter"> Tweet 100+</span> 
            </span>
        </div>  
    </div>  
</div>

最佳答案

给span类固定宽度并添加显示 block

.min-head { width:150px; display:block}

关于html - float 在 bootstrap div 中的垂直文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22395781/

相关文章:

javascript - jquery获取元素中鼠标点击百分比的位置

css - Angular 2 teradata共价: how to reduse material 2 toolbar height

javascript - 安装 Waypoints 和 Animate.css

javascript - 为什么 Bootstrap 面板折叠不能与 JSF 一起使用?

javascript - CSS:使用关键帧填充图像

html - 如何在CSS中垂直对齐响应图像

javascript - HTML 不显示内容 - 最近工作

javascript - 发布 Blueimp 画廊 Twitter Bootstrap

html - 如何在容器中仅居中一个元素?

HTML 所见即所得编辑器 : why is the editable content moved in an iFrame