Html+css actual combat 189 side navigation layout

Front end ballad 2022-06-23 18:15:11 阅读数:207

html+csshtmlcssactualcombat

index.css

.banner {
height: 500px;
background-color: #f5f5f5;
}
.banner .wrapper {
position: relative;
height: 500px;
background-color: pink;
}
/* Side navigation */
.banner .aside {
position: absolute;
left: 0;
top: 0;
width: 250px;
height: 500px;
background-color: rgba(0,0,0,.8);
}
.banner .aside li {
height: 50px;
line-height: 50px;
}
.banner .aside a {
position: relative;
/* The width is the same as the parent */
padding-left: 36px;
padding-right: 19px;
display: block;
height: 50px;
color: #fff;
}
.banner .aside a:hover {
background-color: #27ba9b;
}
/* a Add an arrow at the last position inside the */
.banner .aside a::after {
position: absolute;
right: 19px;
top: 19px;
content: '';
width: 6px;
height: 11px;
background-image: url(../images/sprites.png);
background-position: -80px -110px;
}

Running results

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Project code preparation </title>
<!-- Generation of external linked style sheets -->
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="./css/base.css">
<link rel="stylesheet" href="./css/common.css">
<link rel="stylesheet" href="./css/index.css">
</head>
<body>
<!-- Quick navigation -->
<div class="shortcut">
<div class="wrapper">
<ul>
<li><a href="#"> Please log in first </a></li>
<li><a href="#"> Free registration </a></li>
<li><a href="#"> My order </a></li>
<li><a href="#"> Membership Center </a></li>
<li><a href="#"> Help center </a></li>
<li><a href="#"> Online Service </a></li>
<li><a href="#"><span></span> Mobile phone version </a></li>
</ul>
</div>
</div>
<div class="header wrapper">
<div class="logo">
<h1><a href="#"> Rabbit Xianer </a></h1>
</div>
<div class="nav">
<ul>
<li><a href="#"> home page </a></li>
<li><a href="#"> fresh </a></li>
<li><a href="#"> food </a></li>
<li><a href="#"> Kitchen </a></li>
<li><a href="#"> Electrical appliances </a></li>
<li><a href="#"> Home </a></li>
<li><a href="#"> Wash and protect </a></li>
<li><a href="#"> Pregnancy and infant </a></li>
<li><a href="#"> clothing </a></li>
</ul>
</div>
<div class="search">
<input type="text" placeholder=" Search for ">
<!-- location Magnifier -->
<span></span>
</div>
<div class="car">
<span>2</span>
</div>
</div>
<!-- banner -->
<div class="banner">
<div class="wrapper">
<!-- How many pictures are there , There are all less li -->
<ul>
<li>
<a href="#"><img src="./uploads/banner_1.png" alt=""></a>
</li>
</ul>
<!-- Side navigation -->
<div class="aside">
<ul>
<li><a href="#"> fresh <span> Fruits vegetables </span></a></li>
<li><a href="#"> fresh <span> Fruits vegetables </span></a></li>
<li><a href="#"> fresh <span> Fruits vegetables </span></a></li>
<li><a href="#"> fresh <span> Fruits vegetables </span></a></li>
<li><a href="#"> fresh <span> Fruits vegetables </span></a></li>
<li><a href="#"> fresh <span> Fruits vegetables </span></a></li>
<li><a href="#"> fresh <span> Fruits vegetables </span></a></li>
<li><a href="#"> fresh <span> Fruits vegetables </span></a></li>
<li><a href="#"> fresh <span> Fruits vegetables </span></a></li>
<li><a href="#"> fresh <span> Fruits vegetables </span></a></li>
</ul>
</div>
<!-- arrow -->
<!-- prev: the previous -->
<a href="#" class="prev"></a>
<!-- next : next -->
<a href="#" class="next"></a>
<!-- Dot : current state : current / active -->
<!-- js Find the user clicked li Add class name li Turn white -->
<ol>
<li></li>
<li></li>
<li class="current"></li>
<li></li>
<li></li>
</ol>
</div>
</div>
<!-- Copyright area -->
<div class="footer">
<div class="wrapper">
<div class="top">
<ul>
<li>
<!-- Add labels through pseudo elements to realize the wizard diagram -->
<span> The price is close to the people </span>
</li>
<li>
<span> Fast logistics </span>
</li>
<li>
<span> Fresh quality </span>
</li>
</ul>
</div>
<div class="bottom">
<p>
<a href="#"> About us </a> |
<a href="#"> Help center </a> |
<a href="#"> After-sales service </a> |
<a href="#"> Delivery and acceptance </a> |
<a href="#"> Business cooperation </a> |
<a href="#"> Search recommendations </a> |
<a href="#"> link </a>
</p>
<p>CopyRight @ Rabbit Xianer </p>
</div>
</div>
</div>
</body>
</html>

Running results

版权声明:本文为[Front end ballad]所创,转载请带上原文链接,感谢。 https://qdmana.com/2022/174/202206231649016061.html