如何将图像的位置向左移动?

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

我正在尝试将图像的位置移到此网页的左侧,但是我尝试执行的所有操作均无效。这是我的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个回答
0
投票

没有称为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">
© www.soinside.com 2019 - 2024. All rights reserved.