【问题标题】:Why is it that the text on the left of the images is there instead of down?为什么图像左侧的文字在那里而不是下方?
【发布时间】:2023-02-26 05:46:29
【问题描述】:

the images that i have problem 我是前端 Web 开发的 bigenner,我正在测试我学到的一些新东西,我想在底部添加 3 张图像和一些选项,但由于某些原因它一直保持在左侧。我在线复制了一些 css 以将图像制作为他们在那里(我还不熟悉CSS)有人可以帮助我吗?

我尝试将所有内容放在 section 和 div 中,添加 br 但似乎没有任何效果!

【问题讨论】:

标签: javascript html css web frontend


【解决方案1】:

我怀疑文字没有向左移动,而是图像向右移动

首先尝试用非常小的图像替换图像(几个像素,或者明确声明它们的宽度很窄)。

如果这不能解决您的问题,请使用 Stack Overflow 上文本输入框顶部的“<>”代码符号,以允许您以允许人们尝试和编辑它的方式粘贴您的 HTML 和 CSS为他们自己。

【讨论】:

    【解决方案2】:
    1. Try this css for centering all text:
    
    * {text-align: center;}
    
    2. Try this css for centering all text within body
    
    body {text-align: center;}
    
    3. similarly, try this css for centering text within a specific class
    
    .class_name {text-align: center;}
    

    顺便说一句,分享您的代码以便人们更好地理解问题。

    【讨论】:

      猜你喜欢
      • 2011-06-16
      • 2013-06-08
      • 1970-01-01
      • 2022-01-22
      • 2013-05-27
      • 1970-01-01
      • 2013-08-26
      • 1970-01-01
      • 2020-10-05
      相关资源
      最近更新 更多