help w/ code breaking?

im trying to give my profile a warning screen as well as that floating animation thing that i see a bunch of cool profiles have but im having a lot of trouble getting them to work together? on their own they work fine but it seems like they just completely break when theyre both on my profile at the same time. does anyone know why tgis is happening? ill leave the code below the pics showing whats happening


this is what the warning screen is + code below

what the warning screen is supposed to look like

<div id="profile">

<h1>❗before you enter❗</h1>

<p>this profile is meant to be viewed on desktop, IT WILL NOT LOOK GOOD ON MOBILE/TABLET (my bad lol). there also might be some things in this profile you may not like, such as: </p>

<ul>

<li>bright moving colors (not strobe, just a lot of moving stuff)</li>

<li>eyes, specifically staring eyes (ommetaphobia)</li>

<li>autoplaying music (living in the sunlight - tiny tim)</li>

<li>cursing</li>

</ul>

<p>if thats all good with you, then welcome! if not, i hope you have a good day :) </p>

<a href="#profile">hello!!</a>

<a href="https://spacehey.com/home">goodbye!!</a>

<img src="https://static.wixstatic.com/media/69154f_9f3dec116da5459e9f345a18b1252f3a~mv2.gif"/>

</div>


<style> 

:root {

  --warning-background-color: #FFFFFF;

  --warning-text-color: #284880;

}


#profile {

 position: fixed;

 z-index: 100;

 top: 0; 

 left: 0;

 width: 100vw;

 height: 100vh;

 padding: 50px 100px;

 font-size: 200%;

 background-color: var(--warning-background-color);

 color: var(--warning-text-color);

 overflow-y: scroll;

 opacity: 1;

 transition: .2s;

}


#profile > * {

 width: 100%;

 max-width: 700px!important;

 margin: 20px auto;

 display: block;

}


#profile:target {

 opacity: 0;

 visibility: hidden;

}


#profile > a {

 text-align: center;

 font-weight: bold;

}


#profile > ul {

 padding: 10px 50px;

border: 10px solid black;

 border-image: url(https://file.garden/ZCTlbRQZY2RSmYXG/deargodjr.png) 30 stretch;

border-radius: 5px;

var(--warning-text-color);

}

</style>


this is the floating shit + code

what the floating is supposed to look like

main {

animation: floating 3s ease-in-out infinite

}

.floating { 

    animation-name: floating;

    animation-duration: 3s;

    animation-iteration-count: infinite;

    animation-timing-function: ease-in-out;

    margin-left: 30px;

    margin-top: 5px;

}

 

@keyframes floating {

    0% { transform: translate(0,  0px); }

    50%  { transform: translate(0, 15px); }

    100%   { transform: translate(0, -0px); }

}


and this is what happens when the two are both on the profile at the same time.....

carnage /hyp

idk what to change or fix to make them both work (unless they cant work together at all?) i am struggling,,,,,,,,,,


4 Kudos

Comments

Displaying 2 of 2 comments ( View all | Add Comment )

☆ Sam ?!

☆ Sam ?!'s profile picture

HII!! You're a lifesaver, but I'm having issues with the warning screen... (The welcome home gif)

I added my own but it looks too big, I was wondering if you knew some sort of code to resize my gif ; I've been trying to modify it but nothing's worked so far!


Report Comment



i think with resizing the gif you just have to find a gif that fits tbh, ive tried figuring out how to resize <(/)img> things as well but i havent found anything yet :(( once i do ill reply again w/ the code tho!!

by eli!! 𓇉; ; Report

That’s alr, tysm again!

by ☆ Sam ?!; ; Report

❝ 𝚉𝚎𝚗𝚗 ❞

❝ 𝚉𝚎𝚗𝚗 ❞'s profile picture

omgeez I get that too so I just didn't keep it! I think it's something to do with one of the codes having the floating animation, I think they can't be on at the same time? I have absolutely no idea since I didn't bother to try to fix it,,,


Report Comment



yeah,, if i knew how to redirect the floating animation to effect everything BUT the warning screen i think that would fix things but i feel like that would be really complicated to figure out lol

by eli!! 𓇉; ; Report