简体   繁体   English

您如何将图像环绕在段落等浮动div周围?

[英]How do you wrap an image around a floated div like a paragraph?

I have a floated right div , and the p tags are wrapping around it correctly, but I was wondering if it's possible to have the image wrap around the floated element as well. 我有一个浮动的右divp标签正确地环绕了它,但是我想知道是否也可以将图像包裹在浮动的元素上。

Here is the code: 这是代码:

 <section class="entry-content clearfix" itemprop="articleBody"> <div class="quick-facts"> <h3>Quick Facts Box</h3> <ul> <li>There are over 1000 bones in a complete blue whale </li> <li>Blue whales live to be very old and have many children</li> </ul> <img src="/2014/02/IMG_1325-275x275.jpg"> </div> <p>The Noyo Center for Science &amp; Education (Noyo Center) will serve as a cold water marine research center for the community college and State college system while educating the public (residents, school children, visitors) through exhibits, lectures, classes, and guided tours about the impacts that humans have on our marine and terrestrial environment and ways that we can work to improve conservation of these resources. The Noyo Center's primary goal is to foster activities promoting research and education that support ocean and coastal ecosystem restoration. Secondary goals are to develop education and research that support sustainable forestry and fishing practices, and to increase ocean and ecological literacy. The development program includes the Nature Center and Aquarium (6,100 SF) and Marine Research facilities (3,250 SF).</p> <p>In 2010 the Noyo Center design won an award from the Redwood Chapter of the American Institute of Architects (AIA).</p> <h2>Noyo Center Property Acquistion Completed!</h2> <img class="alignleft size-full wp-image-102" alt="fort-bragg" src="/2014/02/fort-bragg.jpg" width="1000" height="275"> <p>“Last week, escrow closed on the City's acquisition of 11½ acres from Georgia Pacific for future development of the Noyo Center for Science &amp; Education. The property is located adjacent to the Noyo Headlands Park property on the southern part of the former mill site (near the City's wastewater treatment facility). The property was acquired with a “repayable” grant provided by the State Coastal Conservancy.</p> </section> 

You cannot actually wrap anything inside an img tag because it doesn't consist a closing tag like paragraph tag has a closing tag <p></p> . 您实际上无法将任何内容包装在img标签内,因为它不包含结束标签,例如段落标签具有结束标签<p></p>

If you want a border image to be shown around the div then you can refer to this link http://www.w3schools.com/cssref/css3_pr_border-image.asp 如果要在div周围显示边框图像,则可以参考此链接http://www.w3schools.com/cssref/css3_pr_border-image.asp

I think your question is too much confusing because i cant see any paragraph tags wrapping any div in your code .If i got your question wrong then please elaborate or show any example similar to what you want to exactly achieve . 我认为您的问题太令人困惑了,因为我看不到任何段落标记将任何div包装在您的代码中。如果我错了您的问题,请详细说明或显示与您想要实现的目标类似的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM