段落中字体围绕第一个字 或者字体围绕图片

来源:互联网 发布:留学生回国 知乎 编辑:程序博客网 时间:2024/04/27 13:26


<div class="first">
    放大看酸辣粉你俩快点撒娇疯狂的思考了疯狂的酸辣粉考虑对方考虑的考虑发sd卡浪费点卡考了多少分?
</div>

  .first{
            width:300px;
            height:300px;
            border:1px solid #ccc;
            margin:0 auto;
        }
        .first::first-letter{
            color:red;
            font-weight:700;
            font-size:60px;
            float:left;
        }



文字围绕图片:
<div class="second">
    <img src="images/01.jpg"> 放大看酸辣粉你俩快点撒娇疯狂的思考了疯狂的酸辣粉考虑对方考虑的考虑发sd卡浪费点卡考了多少分?
</div>
.second{
            width:300px;
            height:200px;
            border:1px solid red;
            margin:0 auto;
        }
        .second img{
            width:150px;
            float:left;
        }
同样:

文字环绕图片也是一样的
<div>
    <img src="image/01.jpg">
    <p>可分可浪费快乐的萨菲扣篮大赛反馈飞机的萨菲进口的沙发尽快的快速减肥后尽快的撒谎附近看到上飞机的萨菲还多久萨菲会尽快大三房科技大厦尽快发的撒</p>
</div>

   <style>


        div {
            width: 500px;
            height: 300px;
            border: 1px solid #ccc;
            margin: 0 auto;
        }


        div img {
            float: left;
        }


    </style>



虽然简单,但是都是经验所得,希望对你们帮助;





原创粉丝点击