[我正试图通过将图像左右浮动来将文本环绕在图像上,但是什么也没发生

问题描述 投票:0回答:1

我仍在学习,并试图让我的文字环绕两张图像,一幅左一幅,但似乎没有什么改变。我不确定自己在做什么错! :(任何建议都非常感谢!

这是它的外观。

enter image description here

.skill-row {
  display: inline-block;
  width: 50%;
  margin: 100px auto 100px auto;
  text-align: left;
  line-height: 2;
}

.layout-pic {
  width: 25%;
  float: left;
  margin-right: 30px;
}

.phones-pic {
  width: 25%;
  float: right;
}
<div class="skills">
  <h2>My Skills.</h2>
  <div class="skill-row">
    <img class="circular" "layout-pic" src="images/layout.png" alt="website-layout-pic">

    <h3>Create Your Vision</h3>
    <p>I create using a complementary focus on color palettes, typography, and quality content. All of these elements help to bring your vision to life and really make it SHINE.</p>
  </div>
  <div class="skill-row">
    <img class="circular" "phones-pic" src="images/seo.jpg" alt="phone-screens">

    <h3>Fine Tune Your Vision</h3>
    <p>As a developer, I know how to fine tune your website to give your audience the best functionality and visual appeal across devices.</p>
  </div>
</div>
css css-selectors css-float
1个回答
2
投票

多类应该像这样包装在一个字符串中:

  • <img class="one two three"/>
  • 并且不像<img class="one" "two" "three"/>,这是错误的
© www.soinside.com 2019 - 2024. All rights reserved.