【问题标题】:how can I move the position of my image to the left?如何将图像的位置向左移动?
【发布时间】:2020-07-02 20:30:51
【问题描述】:

我正在尝试将我的图像位置移动到此网页的左侧,但我尝试的一切都不起作用。这是我的 html 代码:

<div class="col-md-6 col-lg-6 pl-md-5 py-5">
                    <div class="row justify-content-start pb-3">
                  <div class="col-md-12 heading-section ftco-animate">
                    <h1 class="big">About</h1>
                    <h2 class="mb-4">About Me</h2>
                    <p>A small river named Duden flows by their place and supplies it with the necessary regelialia.</p>
                      <img src = 'static/images/aman.jpg' height = 400px width = 400px left = 200px>

【问题讨论】:

  • 请用更多信息编辑您的代码,以便我们为您提供帮助...另外,我认为您的图像已经在左边了!!!!!!!!!!!!你的意思是对的?????????

标签: html css image position frontend


【解决方案1】:

没有名为left 的有效HTML 属性。与position: relative结合使用时,您可以使用CSS中的left属性移动图像。

<h1 class="big">About</h1>
<h2 class="mb-4">About Me</h2>
<p>A small river named Duden flows by their place and supplies it with the necessary regelialia.</p>
<img src="http://placekitten.com/400" height="400px" width="400px" style="position:relative;left:200px">

【讨论】:

    猜你喜欢
    • 2013-02-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-05
    相关资源
    最近更新 更多