<link href="/styles/menu.css" rel='stylesheet' />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<nav class='Menu'>
<div class='wrapper region'>
<div class="topnav" id="myTopnav">
<a href="#home" class="active">ទំព័រដើម</a>
<a href="#news">ព័ត៌មាន</a>
<a href="#contact">ទំនាក់ទំនង</a>
<div class="dropdown">
<button class="dropbtn">ជំពូក
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="#">តំណរភ្ជាប់ ១</a>
<a href="#">តំណរភ្ជាប់ ២</a>
<a href="#">ទំណរភ្ជាប់ ៣</a>
</div>
</div>
<a href="#about">អំពីយើងខ្ញុំ</a>
<a href="/users">ចូលក្នុង</a>
<a href="javascript:void(0);" class="icon" onclick="myFunction()">☰</a>
</div>
</div>
</nav>
<script>
function myFunction() {
var x = document.getElementById("myTopnav")
if (x.className === "topnav") {
x.className += " responsive"
} else {
x.className = "topnav"
}
}
</script>
.Menu{
background: var(--menu);
}
.Menu .topnav {
background-color: var(--menu);
overflow: hidden;
}
.Menu .topnav a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font: 17px/1.5 Anton, Koulen;
}
.Menu .active {
background-color: green;
color: white;
}
.Menu .topnav .icon {
display: none;
}
.Menu .dropdown {
float: left;
overflow: hidden;
}
.Menu .dropdown .dropbtn {
font: 17px/1.5 Anton, Koulen;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
margin: 0;
}
.Menu .dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.Menu .dropdown-content a {
float: none;
color: var(--menu);
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.Menu .topnav a:hover, .dropdown:hover .dropbtn {
background-color: black;
color: white;
}
.Menu .dropdown-content a:hover {
background-color: #ddd;
color: black;
}
.Menu .dropdown:hover .dropdown-content {
display: block;
}
@media screen and (max-width: 600px) {
.Menu .topnav a:not(:first-child), .dropdown .dropbtn {
display: none;
}
.Menu .topnav a.icon {
float: right;
display: block;
}
}
@media screen and (max-width: 600px) {
.Menu .topnav.responsive {position: relative;}
.Menu .topnav.responsive a.icon {
position: absolute;
right: 0;
top: 0;
}
.Menu .topnav.responsive a {
float: none;
display: block;
text-align: left;
}
.Menu .topnav.responsive .dropdown {float: none;}
.Menu .topnav.responsive .dropdown-content {position: relative;}
.Menu .topnav.responsive .dropdown .dropbtn {
display: block;
width: 100%;
text-align: left;
}
}
GitHub: https://github.com/Sokhavuth/tv
Heroku: https://khmerweb-tv.herokuapp.com/
Responsive: http://www.responsinator.com