将照片放在左侧,将带有“关于我”按钮的说明放在右侧

发布于 2025-01-15 13:52:16 字数 1104 浏览 1 评论 0原文

我的代码有问题。

当我更正它时,我左侧的照片消失了,并且描述的格式和关于我的按钮没有出现

所以我的问题是:

代码如下:

<div class="image">

    <img src="images/photo ze.jpg" alt="">

</div>



<div class="content">

    <h1>My name is José Moreira, I am

        <span

           class="txt-rotate"

           date-period="2000"

           data-rotate='[ "Graphic Design.", "Photographer.", "Web developer.",]'></span>

      </h1>

    <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Optio doloribus ullam at commodi sit, excepturi dicta minus cumque rerum quod nisi sapiente accusantium, accusamus a atque totam adipisci. Who, error?</p>

    <a href="#about" class="btn">about me</a>

</div>

完整的代码位于:

https://jsfiddle.net/Quencyjones79/zrp9e12g/1/

https://codepen.io/Quencyjones79/pen/GRyZQeG

我非常感谢您的帮助。

I'm having problems with the code.

When I corrected it, my photo on the left side disappeared and the formatting of the description and about me button does not appear

So my question is:

The code is below:

<div class="image">

    <img src="images/photo ze.jpg" alt="">

</div>



<div class="content">

    <h1>My name is José Moreira, I am

        <span

           class="txt-rotate"

           date-period="2000"

           data-rotate='[ "Graphic Design.", "Photographer.", "Web developer.",]'></span>

      </h1>

    <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Optio doloribus ullam at commodi sit, excepturi dicta minus cumque rerum quod nisi sapiente accusantium, accusamus a atque totam adipisci. Who, error?</p>

    <a href="#about" class="btn">about me</a>

</div>

The complete code is at:

https://jsfiddle.net/Quencyjones79/zrp9e12g/1/

https://codepen.io/Quencyjones79/pen/GRyZQeG

I greatly appreciate your help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蒲公英的约定 2025-01-22 13:52:16

在 CSS 中,您设置了以下 img 属性。将 display: none; 应用于 img 选择器后,页面上的图像将不可见,除非您使用另一个更具体的 CSS 规则覆盖该规则。

img{
    position: relative;
    width: 100%;
    display: none;
}

显示您关心的图像的一种方法是将 display: inline 添加到 .home .image img{} 选择器。我并不是说这是最好的方法,但它展示了如何定位您关心的特定图像并更改其显示属性。您还可以从 img 中删除 display: none 属性。

如果您有兴趣,了解如何使用开发者工具调试 CSS

In your CSS, you have the following img properties set. With display: none; applied to the img selector, images on the page will not be visible unless you override the rule with another, more specific CSS rule.

img{
    position: relative;
    width: 100%;
    display: none;
}

One way to get the image you are concerned with to appear would be to add display: inline to the .home .image img{} selector. I'm not saying this is the best approach, but it shows how to target the specific image you are concerned with and change its display property. You could also just remove the display: none property from img.

If you're interested, learn how to debug CSS with developer tools.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文