首页 > 解决方案 > 如何在图像上获取文本?

问题描述

**No error in this code**

我基本上想要做的是让我的文字预先批准并将其放在我的图像上,我得到的最接近的是将我的文字放在图像后面而不是放在我的图像上。希望我能得到一些帮助,谢谢。

import React from ‘react’;
import Car from ‘./car_lot.jpg’
import Header from ‘./logo.png’
import Paperwork from ‘./sign_documents.jpg'
import Car_Galleryimg1 from './jeep.jpg'
import Car_Galleryimg2 from './bmw.jpg'
import Car_Galleryimg3 from './toyota.jpg'

import ImageGallery from 'react-image-gallery';

const images = [
  {
    original: Car_Galleryimg1,
    thumbnail: Car_Galleryimg1,
  },
  {
    original: Car_Galleryimg2,
    thumbnail: Car_Galleryimg2,
  },
  {
    original: Car_Galleryimg3,
    thumbnail: Car_Galleryimg3
  },
];
function Home() {
  return (

**Trying to get preapproved onto my image the closest I have gotten is getting the word preapproved behind my image but not onto it and that is what I’m trying to figure out**

      <div className=“home”&gt;
      <img src={Header} className=“logo.png”/>
      <h1>Welcome to Exclusive Auto Sales</h1><link href=“https://fonts.googleapis.com/css2?family=Josefin+Sans&display=swap" rel="stylesheet"/>
      <h3>Get pre-approved!</h3><img src={Paperwork} className="sign_documents"/>


      <h2>Get your dream car today
      we are here to help you!</h2>
      <ImageGallery items={images} />
      </div>




  );
}

export default Home;

标签: pythondjangoreactjsimagetext

解决方案


您也许可以使用一些 CSS 来完成。试试这个W3 Schools网站。


推荐阅读