How do you add images in HBuilder?

There are several ways to add images in HBuilder.

  1. Drag and drop: Simply drag the image file from the file manager to the workspace or project folder in HBuilder to add the image.
  2. Right-click menu: Right-click in HBuilder’s workspace or project folder, choose “New” -> “File”, then select the image file to add.
  3. Import from the file menu: Select “File” from the menu bar in HBuilder, then choose “Import” -> “File”, and select the image file to add.
  4. Plugins can be used in HBuilder, such as the image selector plugin, which allows you to add images by importing the plugin and calling the relevant API.

It is important to note that after adding an image, the image file must be included in the HTML page in order to display the image on the page. This can be done by using the tag to insert the image, for example:

<img src="路径/图片文件名.jpg" alt="图片描述">
bannerAds