Editing User:Toad64/Homepage

Warning: You are not logged in. Once you make an edit, a temporary account will be created for you. Learn more. Log in or create an account to continue receiving notifications after this account expires, and to access other features.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
<h3>Herocard design idea</h3>
<h3>Hero Card interaction with mouse</h3>
<p>This javascript code adds a listener to the <code>.HeroCard</code> element to allow the card the mouse is currently hovered over to tilt based on the mouse's location, relative to the center of the card:</p>
<p>This javascript code adds a listener to the <code>.HeroCard</code> element to allow the card the mouse is currently hovered over to tilt based on the mouse's location, relative to the center of the card:</p>
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
Line 55: Line 55:
</syntaxhighlight>
</syntaxhighlight>


Using some css code, the background of the Hero Card can  its background change when hovered (if not blocked behind the hero image).<syntaxhighlight lang="css">
<p> You can see this code in action by clicking [https://deadlock.wiki/User:Toad64/Sandbox?withJS=User:Toad64/common.js Here] (desktop required).</p>
.HeroCard .CardBacker {
{{Deadlock Wiki/Heroes}}
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;


    background-image: url("/images/1/1c/Card_backer.png");
Using a similar code, this also works with the hero image card found on that Hero's wiki page:
    background-size: 100% 100%;
<syntaxhighlight lang="javascript">
    background-repeat: no-repeat;
add new java script block here, if needed
 
    opacity: 0;
    transition: opacity 0.2s ease, filter 0.2s ease;
   
    filter: brightness(0) saturate(100%) invert(74%) sepia(35%) saturate(620%) hue-rotate(114deg) brightness(91%) contrast(89%);
}
 
.HeroCard:hover .CardBacker {
    opacity: 1;
}
 
.HeroCard .HeroImage,
.HeroCard .HeroName {
    position: relative;
    z-index: 2;
}
</syntaxhighlight>
</syntaxhighlight>
 
{{Infobox hero
<templatestyles src="User:Toad64/styles.css"/>
| key = hero_unicorn
<p> You can see the javascript code in action by clicking [https://deadlock.wiki/User:Toad64/Sandbox?withJS=User:Toad64/common.js Here] (desktop required).</p>
| voice_actor = <!--Natalie Lander (SPECULATION) -->
{{Deadlock Wiki/Heroes}}
| release_date = February 9 2026
| codenames = Unicorn, Pepper
}}
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Deadlock:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)