加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

HTML – 如何围绕div包装文本?

发布时间:2020-12-14 19:39:47 所属栏目:资源 来源:网络整理
导读:我的coinlider附近有一个容器div.我想在这个容器div周围包装文本.如何实现这一目标? 现在我的HTML设置如下: p !-- LOTS OF TEXT -- /pdiv id="mycontainer" !-- coinslider inside --/div 我的CSS设置如下: #mycontainer {position: relative;float: righ
我的coinlider附近有一个容器div.我想在这个容器div周围包装文本.如何实现这一目标?

现在我的HTML设置如下:

<p> <!-- LOTS OF TEXT --> </p>
<div id="mycontainer"> <!-- coinslider inside --></div>

我的CSS设置如下:

#mycontainer {
position: relative;
float: right;
width: 500;
height: 334;
}

解决方法

<div>
    <div  style="float:left; width: 150px; height: 150px; margin: 10px; background-color: #ff0000;">
        <!--your image or text--> 
    </div>
    <p>But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system,and expound the actual teachings of the great explorer of the truth,the master-builder of human happiness. No one rejects,dislikes,or avoids pleasure itself,because it is pleasure,but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself,because it is pain,but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example,which of us ever undertakes laborious physical exercise,except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences,or one who avoids a pain that produces no resultant pleasure?</p>
    <p>But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system,or one who avoids a pain that produces no resultant pleasure?</p>
</div>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读