An open API service indexing awesome lists of open source software.

https://github.com/mohd-faizy/learnwebtech

WebTechnologies: HTML, CSS, JavaScript
https://github.com/mohd-faizy/learnwebtech

angular css3 html javascript node nodejs php

Last synced: about 1 year ago
JSON representation

WebTechnologies: HTML, CSS, JavaScript

Awesome Lists containing this project

README

          

# WebTechnologies





## Getting Started

### Sample Code Snippet for simple HTML page

### HTML (index.html)

```html









```

### CSS (styles.css)

```css
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
}

.sticky-header {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: #333;
color: #fff;
padding: 10px 0;
z-index: 100;
}

.sticky-header nav ul {
list-style: none;
padding: 0;
margin: 0;
display: flex;
justify-content: center;
}

.sticky-header nav ul li {
margin: 0 20px;
}

.sticky-header nav ul li a {
text-decoration: none;
color: #fff;
font-weight: bold;
}

.content {
padding: 100px 20px;
}

```

### JavaScript (script.js)

```js
window.addEventListener("scroll", function() {
const header = document.querySelector(".sticky-header");
const scrollY = window.scrollY;

if (scrollY > 100) { // Adjust the value as needed
header.classList.add("sticky");
} else {
header.classList.remove("sticky");
}
});

```