<style type="text/css">
li {
list-style: none;
display: inline-block;
position: relative;
}
.nav-container {
top: 20px;
position: absolute;
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
left: 0;
}
.nav {
width: 100%;
height: 40px;
maring: 0 auto;
text-align: center;
line-height: 20px;
border-top: 1px solid red;
border-bottom: 1px solid red;
}
.menu-item {
display: inline-block;
width: 50px;
padding-left: 30px;
padding-right: 30px;
padding-top: 10px;
padding-bottom: 10px;
color: #777777;
margin-left: 6px;
margin-right: 6px;
}
.menu-item:not(:first-child)::before {
content: "";
position: absolute;
left: -13px;
top: 15px;
width:8px;
height:8px;
border:2px solid red;
border-radius:10px;
}
.menu-item:hover {
background-color: black;
cursor: pointer;
border-radius: 2px;
}
</style>
<body>
<div class="nav-container">
<ul class="nav">
<!--Items-->
<li id="menu-item-1" class="menu-item">Item 1</li>
<li id="menu-item-2" class="menu-item">Item 2</li>
<li id="menu-item-3" class="menu-item">Item 3</li>
<li id="menu-item-4" class="menu-item">Item 4</li>
<li id="menu-item-5" class="menu-item">Item 5</li>
</ul>
</div>
</body>
Output :)
li {
list-style: none;
display: inline-block;
position: relative;
}
.nav-container {
top: 20px;
position: absolute;
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
left: 0;
}
.nav {
width: 100%;
height: 40px;
maring: 0 auto;
text-align: center;
line-height: 20px;
border-top: 1px solid red;
border-bottom: 1px solid red;
}
.menu-item {
display: inline-block;
width: 50px;
padding-left: 30px;
padding-right: 30px;
padding-top: 10px;
padding-bottom: 10px;
color: #777777;
margin-left: 6px;
margin-right: 6px;
}
.menu-item:not(:first-child)::before {
content: "";
position: absolute;
left: -13px;
top: 15px;
width:8px;
height:8px;
border:2px solid red;
border-radius:10px;
}
.menu-item:hover {
background-color: black;
cursor: pointer;
border-radius: 2px;
}
</style>
<body>
<div class="nav-container">
<ul class="nav">
<!--Items-->
<li id="menu-item-1" class="menu-item">Item 1</li>
<li id="menu-item-2" class="menu-item">Item 2</li>
<li id="menu-item-3" class="menu-item">Item 3</li>
<li id="menu-item-4" class="menu-item">Item 4</li>
<li id="menu-item-5" class="menu-item">Item 5</li>
</ul>
</div>
</body>
Output :)
No comments:
Post a Comment