簡體   English   中英

如何將內容包裝在圖像周圍?

[英]How to wrap the contents around an image?

我正在嘗試為個人網站創建一個關於頁面。 我想知道如何在圖片周圍包裹文字。 我想要這種效果。 http://alexbudak.com/about/

我現在擁有的代碼是:

 <div class="about_content">
            <img src="placeholder.jpg" alt="">
            <h2>The Brand</h2>
            </p>
            The Tailory New York is an appointment only custom clothing              company that combines the modernity of Fashion Design with the heritage art of Custom Tailoring. We are unique in that we cater to both the Men and Women market.
           </p>
            <h2>The Concept </h2>
                <p>
                    Providing personally designed, fitted and curated collections for each individual client is the essence of who we are. At The Tailory New York, we believe that your wardrobe should not only fit perfectly, but should be designed with only YOU in mind. The end result?—clients get the best of both worlds, impeccable custom fit and custom designed pieces that works seamlessly with their lifestyle.
                </p>
            <h2>A Note From the Founder</h2>
                <p>
                    The idea for The Tailory New York began when I decided to direct my years of fashion design and men’s tailoring experience towards my own wardrobe. As a pant suit aficionado and a lover of men’s fashion and tailoring, I was always drawn to tailored clothing and strived to create fashion that conveyed the same message of confidence that a perfectly custom tailored suit did for men. Style icons like Sean Connery and Cary Grant, as well as modern day 007 Daniel Craig (shaken not stirred) were always my style inspirations. To me, they are the epitome of refinement and sophistication, true gentlemen in style.
                    My passion for fashion and tailoring led me through the Fashion Design program at Parsons followed by stints in custom tailoring, fashion design, fashion styling and brand development. But the more I integrated myself in the industry, the more I realized that impeccable fit, for men and women, was almost impossible to find in ready to wear clothing. So, I launched The Tailory New York, a way for me to combine my two passions, Fashion Design and Custom Tailoring. Everyone wants to look their best and having a wardrobe curated to your body and lifestyle not only enables you to look your best but makes you feel your best.
                    At The Tailory New York, “we believe that your wardrobe should not only fit perfectly, but should be designed with only YOU in mind.” Providing personally designed, fitted and curated collections for each individual client is the essence of who we are. Let us curate and design the wardrobe fit for YOU! </br>
                    <br> </br>
                    Sincerely,</br>
                    Shao Yang, Founder 
                    <br> </br>
                </p> 
        </div>

和的CSS是:

h2{
    margin: 0 0 1.2em 0;
    font-family: 'Raleway', 'sans-serif';
    font-weight: normal;
}

.about_content{
    width: 500px;
    overflow: hidden;
  }

.about_content img{
    margin-right: 15px;
    float: left;
}
.about_content p: last-child{
    margin-bottom: 0;
}

您現在擁有的內容將導致內容環繞圖像。 這樣做的技巧是應用float: left; 到您已經完成的圖像。

我懷疑正在發生的事情是您的圖像太寬。 如果.about_content像素,則圖像將占據.about_content的整個寬度,因此您需要限制圖像的大小。 這是在圖像上使用max-width的示例。

 h2{ margin: 0 0 1.2em 0; font-family: 'Raleway', 'sans-serif'; font-weight: normal; } .about_content{ width: 500px; overflow: hidden; } .about_content img{ margin-right: 15px; float: left; max-width: 250px; } .about_content p: last-child{ margin-bottom: 0; } 
  <div class="about_content"> <img src="https://static1.squarespace.com/static/541ff355e4b03f1e8815bc58/t/54b43e30e4b0ad2aad39a7f2/1421098552235/budak?format=500w" alt=""> <h2>The Brand</h2> </p> The Tailory New York is an appointment only custom clothing company that combines the modernity of Fashion Design with the heritage art of Custom Tailoring. We are unique in that we cater to both the Men and Women market. </p> <h2>The Concept </h2> <p> Providing personally designed, fitted and curated collections for each individual client is the essence of who we are. At The Tailory New York, we believe that your wardrobe should not only fit perfectly, but should be designed with only YOU in mind. The end result?—clients get the best of both worlds, impeccable custom fit and custom designed pieces that works seamlessly with their lifestyle. </p> <h2>A Note From the Founder</h2> <p> The idea for The Tailory New York began when I decided to direct my years of fashion design and men's tailoring experience towards my own wardrobe. As a pant suit aficionado and a lover of men's fashion and tailoring, I was always drawn to tailored clothing and strived to create fashion that conveyed the same message of confidence that a perfectly custom tailored suit did for men. Style icons like Sean Connery and Cary Grant, as well as modern day 007 Daniel Craig (shaken not stirred) were always my style inspirations. To me, they are the epitome of refinement and sophistication, true gentlemen in style. My passion for fashion and tailoring led me through the Fashion Design program at Parsons followed by stints in custom tailoring, fashion design, fashion styling and brand development. But the more I integrated myself in the industry, the more I realized that impeccable fit, for men and women, was almost impossible to find in ready to wear clothing. So, I launched The Tailory New York, a way for me to combine my two passions, Fashion Design and Custom Tailoring. Everyone wants to look their best and having a wardrobe curated to your body and lifestyle not only enables you to look your best but makes you feel your best. At The Tailory New York, “we believe that your wardrobe should not only fit perfectly, but should be designed with only YOU in mind.” Providing personally designed, fitted and curated collections for each individual client is the essence of who we are. Let us curate and design the wardrobe fit for YOU! </br> <br> </br> Sincerely,</br> Shao Yang, Founder <br> </br> </p> </div> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM