Sure, here's a simple example of how you can create a sticky header for a website using CSS and JavaScript:
HTML:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sticky Header Example</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header id="header">
<h1>Sticky Header</h1>
</header>
<div class="content">
<!-- Your website content goes here -->
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vehicula sem at nunc commodo, non scelerisque elit laoreet. Integer vel lectus eget metus rutrum aliquet.</p>
</div>
<script src="script.js"></script>
</body>
</html>
```
CSS (styles.css):
```css
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
width: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 1000;
}
.content {
padding-top: 80px; /* Adjust according to the height of your header */
margin: 20px;
}
```
JavaScript (script.js):
```javascript
// JavaScript is not necessary for basic sticky header functionality,
// but you might want to use it for more advanced behaviors.
```
In this example, the header will stick to the top of the page as you scroll down. Adjust the styles and JavaScript according to your specific requirements and design.
Dạ, cảm ơn Chị đã phải hồi, hệ thống luôn lựa chọn những sản phẩm tốt nhất để giúp khách hàng mua được hàng tốt.
Có nhé, Anh yên tâm đặt hàng online ạ, nhận được hàng mới thanh toán tiền. Ngoài ra được đổi/trả hàng miễn phí trong 7 - 15 ngày
Thanks Chị, website bên em luôn cập nhật những sản phẩm bán chạy nhất đề xuất cho người mua nên rất uy tín.
Dạ, tùy vào từng khu vực xa hay gần, nhưng thường không quá 2 ngày là nhận được hàng
Cảm ơn bạn, đừng quên thường xuyên ghé thăm website để xem những sản phẩm mới nhất nhé.