User:Axe Hack/Sandbox: Difference between revisions
From The Urban Dead Wiki
Jump to navigationJump to search
mNo edit summary |
mNo edit summary |
||
Line 5: | Line 5: | ||
<div style="background-color: #f5f5f5; padding: 20px;"> | <div style="background-color: #f5f5f5; padding: 20px;"> | ||
<!-- | <!-- Tabs Section --> | ||
<div | <div class="tabs"> | ||
<input type="radio" id="tab1" name="tab-control" checked> | |||
<input type="radio" id="tab2" name="tab-control"> | |||
<input type="radio" id="tab3" name="tab-control"> | |||
< | <ul> | ||
< | <li title="Tab 1"><label for="tab1" role="button">About Me</label></li> | ||
<li title="Tab 2"><label for="tab2" role="button">Projects</label></li> | |||
<li title="Tab 3"><label for="tab3" role="button">Contact</label></li> | |||
</ul> | |||
<!-- | <div class="content"> | ||
< | <!-- About Me Tab Content --> | ||
< | <section> | ||
< | <h2>About Me</h2> | ||
<p>Welcome to my user page! I am <strong>YourUsernameHere</strong>, and I enjoy contributing to this wiki by adding content related to <i>Your Topics</i>.</p> | |||
</section> | |||
<!-- | <!-- Projects Tab Content --> | ||
< | <section> | ||
< | <h2>Current Projects</h2> | ||
<ul> | <ul> | ||
<li>Project 1: <i>Brief description of the project</i></li> | |||
<li>Project 2: <i>Brief description of the project</i></li> | |||
</ul> | </ul> | ||
</ | </section> | ||
<!-- Contact | <!-- Contact Tab Content --> | ||
< | <section> | ||
< | <h2>Contact Me</h2> | ||
<p>If you'd like to collaborate, feel free to leave a message on my <b>[[User talk:YourUsernameHere|talk page]]</b>.</p> | <p>If you'd like to collaborate, feel free to leave me a message on my <b>[[User talk:YourUsernameHere|talk page]]</b>.</p> | ||
</section> | |||
</div> | |||
</div> | </div> | ||
</div> <!-- End of page wrapper --> | </div> <!-- End of page wrapper --> | ||
<!-- CSS for Tabs --> | |||
<style> | |||
.tabs { | |||
position: relative; | |||
margin-top: 20px; | |||
} | |||
.tabs input[type="radio"] { | |||
display: none; | |||
} | |||
.tabs ul { | |||
display: flex; | |||
list-style: none; | |||
padding: 0; | |||
margin: 0; | |||
background-color: #0073e6; | |||
} | |||
.tabs ul li { | |||
flex-grow: 1; | |||
} | |||
.tabs ul li label { | |||
display: block; | |||
padding: 10px; | |||
text-align: center; | |||
background-color: #0073e6; | |||
color: white; | |||
cursor: pointer; | |||
transition: background-color 0.3s; | |||
} | |||
.tabs ul li label:hover { | |||
background-color: #005bb5; | |||
} | |||
.tabs input[type="radio"]:checked + label { | |||
background-color: #005bb5; | |||
} | |||
.tabs .content section { | |||
display: none; | |||
padding: 10px; | |||
background-color: #f0f0f0; | |||
border: 1px solid #ccc; | |||
margin-top: -1px; | |||
} | |||
#tab1:checked ~ .content section:nth-of-type(1), | |||
#tab2:checked ~ .content section:nth-of-type(2), | |||
#tab3:checked ~ .content section:nth-of-type(3) { | |||
display: block; | |||
} | |||
</style> |
Revision as of 03:58, 10 October 2024
<input type="radio" id="tab1" name="tab-control" checked> <input type="radio" id="tab2" name="tab-control"> <input type="radio" id="tab3" name="tab-control">
- <label for="tab1" role="button">About Me</label>
- <label for="tab2" role="button">Projects</label>
- <label for="tab3" role="button">Contact</label>
<section>
About Me
Welcome to my user page! I am YourUsernameHere, and I enjoy contributing to this wiki by adding content related to Your Topics.
</section>
<section>
Current Projects
- Project 1: Brief description of the project
- Project 2: Brief description of the project
</section>
<section>
Contact Me
If you'd like to collaborate, feel free to leave me a message on my talk page.
</section>
<style>
.tabs { position: relative; margin-top: 20px; } .tabs input[type="radio"] { display: none; } .tabs ul { display: flex; list-style: none; padding: 0; margin: 0; background-color: #0073e6; } .tabs ul li { flex-grow: 1; } .tabs ul li label { display: block; padding: 10px; text-align: center; background-color: #0073e6; color: white; cursor: pointer; transition: background-color 0.3s; } .tabs ul li label:hover { background-color: #005bb5; } .tabs input[type="radio"]:checked + label { background-color: #005bb5; } .tabs .content section { display: none; padding: 10px; background-color: #f0f0f0; border: 1px solid #ccc; margin-top: -1px; } #tab1:checked ~ .content section:nth-of-type(1), #tab2:checked ~ .content section:nth-of-type(2), #tab3:checked ~ .content section:nth-of-type(3) { display: block; }
</style>