I am urgently looking for a way to add this on WIX : https://codepen.io/oknoblich/pen/hpltK
Whar exactly is waht you’re looking for?
dynamic menu with hoover effect and collapsing subpages
Hey,
You can add the following code to an HTML component:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>@import url('https://fonts.googleapis.com/css?family=Open+Sans:700');
@import url('https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100vh;
}
body {
font: 16px 'Open Sans', sans-serif;
background: #ddd;
}
.nav {
position: absolute;
top: 50%;
left: 50%;
width: 500px;
height: 80px;
margin-top: -40px;
margin-left: -250px;
background: #fff;
transform: translateZ(0);
}
.nav:hover .link {
width: 5%;
}
.nav .link {
position: relative;
float: left;
width: 20%;
height: 100%;
color: #aaa;
border-right: 1px solid #ddd;
transition: 0.5s width;
overflow: hidden;
cursor: pointer;
}
.nav .link:last-child {
border-right: 0;
}
.nav .link:hover {
width: 80%;
color: #555;
}
.nav .link .small {
position: absolute;
top: 0;
left: 0;
width: 100px;
line-height: 78px;
text-align: center;
font-family: fontawesome;
font-size: 24px;
}
.nav .link .full {
position: absolute;
top: 22px;
left: 100px;
text-transform: uppercase;
}
.nav .link .full .f1, .nav .link .full .f2 {
font-size: 16px;
font-weight: 700;
white-space: nowrap;
}
.nav .link .full .f2 {
margin-top: 8px;
font-size: 12px;
}
.nav .link .prev {
position: absolute;
top: 0;
left: 7px;
font-family: fontawesome;
font-size: 12px;
line-height: 78px;
transition: 0.5s opacity;
opacity: 0;
}
.nav .link:hover .prev {
opacity: 0;
}
.nav:hover .prev {
opacity: 1;
}
</style>
</head>
<body>
<div class='nav'>
<div class='link'>
<div class='prev'></div>
<div class='small'></div>
<div class='full'>
<div class='f1'>headline</div>
<div class='f2'>some additional info to this link</div>
</div>
</div>
<div class='link'>
<div class='prev'></div>
<div class='small'></div>
<div class='full'>
<div class='f1'>headline</div>
<div class='f2'>some additional info to this link</div>
</div>
</div>
<div class='link'>
<div class='prev'></div>
<div class='small'></div>
<div class='full'>
<div class='f1'>headline</div>
<div class='f2'>some additional info to this link</div>
</div>
</div>
<div class='link'>
<div class='prev'></div>
<div class='small'></div>
<div class='full'>
<div class='f1'>headline</div>
<div class='f2'>some additional info to this link</div>
</div>
</div>
<div class='link'>
<div class='prev'></div>
<div class='small'></div>
<div class='full'>
<div class='f1'>headline</div>
<div class='f2'>some additional info to this link</div>
</div>
</div>
</div>
</body>
</html>
Note that if you wish to redirect to a new page, you would need to use Messaging. Click here to learn more about it.
Best,
Tal.
I would like to use this menu - can anyone walk me through how to add links to this code and what i need to do - i cannot understand how this integrates with the message above, and also how does one go about adjusting the icons that appear?