将文字环绕<i>元素

时间:2019-01-17 10:55:38

标签: css css3 bootstrap-4 font-awesome

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

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

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

2 个答案:

答案 0 :(得分:2)

使用此<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>
        

答案 1 :(得分:1)

这是我的工作: https://codepen.io/anon/pen/ZVNpQE

我可以通过将其添加到您的图标元素中来对其进行修复:

float: left