css - 将文本环绕在 <i> 元素周围

标签 css bootstrap-4 font-awesome

我正在尝试将文本包裹在字体很棒的元素周围,但我得到了以下内容 enter image description here

我希望文本从顶部开始并环绕元素。这可能吗?

这是我写的代码https://www.bootply.com/KtlIG2icyT

最佳答案

使用这个<i class="far fa-file fa-9x text-info" style="float: left; margin-right:7px;"></i>而不是你的<i class="far fa-file fa-9x text-info pull-left"></i>

    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
    
<div class="card border-secondary my-3">
        <div class="card-header">
            <h3>Title</h3>
        </div>
        <div class="card-body text-secondary">
            <div class="card-text">
                <div class="row align-text-top">
                    <div class="col px-5 ">

                        <i class="far fa-file fa-9x text-info" style="float: left; margin-right:7px;"></i>
                        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
                      Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
                      Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

                    <div class="col">
                        <asp:fileupload id="fuDocument" runat="server" cssclass="btn btn-secondary" allowmultiple="False" height="200">
                        <p class="mt-2">
                            <asp:button id="btnUploadFile" runat="server" text="Υποβολή" cssclass="btn btn-primary" onclick="btnUploadFile_Click">
                        </asp:button></p>

                    </asp:fileupload></div>

                </div>
            </div>
        </div>
    </div>
</div>


            <div id="push"></div>
        

关于css - 将文本环绕在 <i> 元素周围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54234353/

相关文章:

asp.net - TextBoxWatermarkExtender WatermarkCssClass 覆盖 TextBox CssClass

jquery - 如何用图像填充 div 而 div 在响应页面上保持其 1 :1. 5 的比例

javascript - 自动对焦于下拉菜单中的输入元素 onclick

bootstrap-4 - 使用 SASS/Gulp 将 Google 字体添加到 Bootstrap 4

javascript - 添加和更改类

javascript - 如何在 jquery(或 javascript)中选择相邻元素

css - IE CSS 百分比

css - 有 Angular Dynamic Form Generator Bootstrap CSS 问题

angular - 如何防止点击行中的一列 - primeNG 数据表?

javascript - 在绑定(bind)之前等待 Font Awesome JS 将 i 转换为 svg