question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

json file renders under another json

See original GitHub issue

I have 2 json files loaded into the same page. One json is always showing behind the other json. I want to swap them. Below is a part of the code… The lottie container always renders on top of the emoji_1,

#emoji_1{
 	    background-color:#fff;
            width: 50%;
            height: 50%;
            display:inline-block;
            overflow: visible;
            opacity: 1;
			
	    position: absolute;
	    left: 50%;
	    transform: translate3d(-50%, 50%, 0);
        }
#lottie{
            background-color:#fff;
            width:100%;
            height:100%;
            display:inline-block;
            overflow: visible;
            transform: translate3d(0,0,0);
            text-align: center;
            opacity: 1;
        }
<div>
	<div id="emoji_1"></div>
	<div id="lottie"> </div>

</div>

anim0 = lottie.loadAnimation(params0); anim1 = lottie.loadAnimation(params1);

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
kiriss91commented, Jun 24, 2019

Thanks. Try assigning z-index: 100; to your emoji. All you want is for it to appear above, correct? I did it this simply, but the emoji has a white background which now covers the main file. Might be best for you to rerender that bg with a class name, then set fill: transparent; on it. Is that what you’re after?

yes, that works perfectly, thanks

1reaction
Inventsablecommented, Jun 24, 2019

Thanks. Try assigning z-index: 100; to your emoji. All you want is for it to appear above, correct? I did it this simply, but the emoji has a white background which now covers the main file. Might be best for you to rerender that bg with a class name, then set fill: transparent; on it. Is that what you’re after?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Load and Render JSON Data into React Components
In this guide, we will work on a code example to load the JSON data from a file and render it inside a...
Read more >
How I can create one component for different JSON files with ...
I need to create one the component that contains react-router to render those JSON Files. I wanted to create different components, ...
Read more >
Working with JSON - Learn web development | MDN
In this article, we've given you a simple guide to using JSON in your programs, including how to create and parse JSON, and...
Read more >
JSON templates - Shopify.dev
JSON templates are data files that store a list of sections to be rendered, and their associated settings. Merchants can add, remove, and...
Read more >
How to render dynamic component defined in JSON using React
To allow us to render a JSON by dynamic components using their name we first have to loop through the array of components...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found