Created
December 31, 2023 03:06
-
-
Save landsurveyorsunited/9d8b7a2a89aefe9022c119762b44817d to your computer and use it in GitHub Desktop.
Hover Glow Buttons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<div class="container"> | |
<ul id="buttonList"> | |
<li><a href="#" title="Post Surveying Stuff" onclick="openModal('modal1')"><i class="fa fa-arrows" aria-hidden="true"></i></a></li> | |
<li><a href="#" title="Land Surveyor Atlas" onclick="openModal('modal2')"><i class="fa fa-map" aria-hidden="true"></i></a></li> | |
<li><a href="#" title="Land Surveyor Globe" onclick="openModal('modal3')"><i class="fa fa-globe" aria-hidden="true"></i></a></li> | |
<li><a href="#" title="Land Surveyors United Feeds" onclick="openModal('modal4')"><i class="fa fa-rss" aria-hidden="true"></i></a></li> | |
<li><a href="#" title="Your Profile on Land Surveyors United" onclick="openModal('modal5')"><i class="fa fa-user" aria-hidden="true"></i></a></li> | |
</ul> | |
</div> | |
</div> | |
<!-- Modal 1 --> | |
<div id="modal1" class="modal"> | |
<iframe src="/news" frameborder="0"></iframe> | |
<span class="close" onclick="closeModal('modal1')">×</span> | |
</div> | |
<!-- Modal 2 --> | |
<div id="modal2" class="modal"> | |
<iframe src="/post-point" frameborder="0"></iframe> | |
<span class="close" onclick="closeModal('modal2')">×</span> | |
</div> | |
<!-- Modal 3 --> | |
<div id="modal3" class="modal"> | |
<iframe src="/hubsmap" frameborder="0"></iframe> | |
<span class="close" onclick="closeModal('modal3')">×</span> | |
</div> | |
<!-- Modal 4 --> | |
<div id="modal4" class="modal"> | |
<iframe src="https://landsurveyorsuniteddocs.on.drv.tw/membertools/opml/supermarketjobs.html" frameborder="0"></iframe> | |
<span class="close" onclick="closeModal('modal4')">×</span> | |
</div> | |
<!-- Modal 5 --> | |
<div id="modal5" class="modal"> | |
<iframe src="/addstuff" frameborder="0"></iframe> | |
<span class="close" onclick="closeModal('modal5')">×</span> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function openModal(modalId) { | |
document.getElementById(modalId).style.display = "block"; | |
document.getElementById('buttonList').style.top = "0"; | |
} | |
function closeModal(modalId) { | |
document.getElementById(modalId).style.display = "none"; | |
} | |
// Close modal when clicking outside of it | |
window.onclick = function(event) { | |
if (event.target.classList.contains('modal')) { | |
event.target.style.display = "none"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin:0; | |
padding:0; | |
background: #111827; | |
} | |
ul#buttonList { | |
margin:0; | |
padding:0; | |
display:flex; | |
position: absolute; | |
top: 50%; | |
left:50%; | |
transform: translate(-50%, -50%); | |
} | |
ul#buttonList li { | |
list-style:none; | |
margin: 0 15px; | |
} | |
ul#buttonList li a { | |
position: relative; | |
display: block; | |
width: 60px; | |
height: 60px; | |
text-align: center; | |
line-height: 60px; | |
background: #171515; | |
border-radius: 50%; | |
font-size: 30px; | |
color: #666; | |
transition: .5s; | |
} | |
ul#buttonList li a:before { | |
content: ''; | |
position: absolute; | |
top:20; | |
left:0; | |
width:100%; | |
height:100%; | |
border-radius:50%; | |
background: #d35400; | |
transition: .5s; | |
transform: scale(.9); | |
z-index: -1; | |
} | |
ul#buttonList li a:hover:before { | |
transform: scale(1.2); | |
box-shadow: 0 0 15px #d35400; | |
filter: blur(3px); | |
} | |
ul#buttonList li a:hover { | |
color: #ffa502; | |
box-shadow: 0 0 15px #d35400; | |
text-shadow: 0 0 15px #d35400; | |
} | |
.modal { | |
display: none; | |
position: fixed; | |
z-index: 1000; | |
left: 0; | |
top: 0; | |
width: 100%; | |
height: 100%; | |
overflow: auto; | |
background-color: rgba(0,0,0,0.9); | |
} | |
.modal iframe { | |
width: 100%; | |
height: 100%; | |
} | |
.close { | |
position: absolute; | |
top: 20px; | |
right: 35px; | |
color: #fff; | |
font-size: 40px; | |
font-weight: bold; | |
cursor: pointer; | |
} | |
.container ul { | |
position: fixed; | |
top: 30px!important; | |
z-index: 1001; | |
transition: top 0.5s ease; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment