webdlh-net/wwwroot/css/scroll-snap.css

47 lines
875 B
CSS

.scroll-container {
height: 100vh;
overflow-y: scroll;
scroll-snap-type: y mandatory;
scroll-behavior: smooth;
}
.section {
height: 100vh;
scroll-snap-align: start;
scroll-snap-stop: always;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.section:nth-child(1) {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.section:nth-child(2) {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.section:nth-child(3) {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.section:nth-child(4) {
background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}
.section-content {
text-align: center;
color: white;
max-width: 800px;
padding: 2rem;
}
.section h2 {
font-size: 3rem;
margin-bottom: 1rem;
}
.section p {
font-size: 1.2rem;
line-height: 1.6;
}