Akash Akash - 1 year ago 59
HTML Question

how to add text and image over the 360 images A-Frame

I wanna add text and image over the 360 image in A-Frame how to add text and images above 360 ?

<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<!-- A-Frame standard library if needed -->
<script src="https://aframe.io/releases/latest/aframe.js"></script>
<!-- Component (includes A-Frame core) -->
<script src="dist/aframe-no-click-look-controls.min.js"></script>
<a-entity camera no-click-look-controls></a-entity>
<a-sky src="https://cdn.glitch.com/fbc36a5e-0d0e-45d3-b6cb-
rotation="0 -130 0"></a-sky>

Answer Source

You can wrap a-scene in a div and set position:relative on it. Next, append another div to the contents of the first one (after a-scene) and set position:absolute on it. This will overlay the contents of the second div over the a-scene. Next, all you need to do is position the second div as required and add text and images inside of it. Should the second div contents not show, consider adjusting it's z-index value.

The resulting code would look something like this:

<div style="position:relative;">
        <!-- a-scene content here -->
    <div style="position:absolute; top:0px; left:0px; z-index:1000;">
        <!-- your overlay content here -->
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download