Slider Chấp Nối - DevForum



DevForum chia sẻ anh em mẫu code Silder Chấp Nối như dao cắt ngầu thì thôi luôn

1. HTML

							

2. CSS

							@import url("https://fonts.googleapis.com/css?family=Montserrat:600");
			.header__main {
				position: relative;
				min-height: 100vh;
				overflow: hidden;
				text-align: left;
			}

			.slider {
				width: 100vw;
				height: 100vh;
			}

			.slide {
				display: -webkit-box;
				display: flex;
				-webkit-box-pack: center;
				justify-content: center;
				-webkit-box-align: center;
				align-items: center;
				height: 100vh;
				position: absolute;
				width: 100%;
			}
			.slide:target .slide__bg {
				opacity: 1;
			}
			.slide:target .slide__image {
				-webkit-transform: translate(0);
				transform: translate(0);
				opacity: 1;
				-webkit-transition-delay: 0.5s;
				transition-delay: 0.5s;
				-webkit-filter: blur(0) drop-shadow(0px 10px 30px rgba(0, 0, 0, 0.35));
				filter: blur(0) drop-shadow(0px 10px 30px rgba(0, 0, 0, 0.35));
			}

			.slide__bg {
				position: absolute;
				z-index: 0;
				top: 50%;
				left: 50%;
				-webkit-transform: translate(-50%, -50%) scale(2);
				transform: translate(-50%, -50%) scale(2);
				-webkit-filter: blur(50px);
				filter: blur(50px);
				opacity: 0;
				-webkit-transition: opacity 1s ease;
				transition: opacity 1s ease;
				will-change: opacity;
			}

			.slide__images {
				position: relative;
				width: 100%;
				max-width: 900px;
				height: 365px;
				margin: 0 20px;
			}

			.slide__image {
				position: absolute;
				width: 100%;
				opacity: 0;
				-webkit-transition: all 0.5s ease-in-out 0s;
				transition: all 0.5s ease-in-out 0s;
				-webkit-filter: blur(10px) drop-shadow(0px 10px 30px rgba(0, 0, 0, 0.35));
				filter: blur(10px) drop-shadow(0px 10px 30px rgba(0, 0, 0, 0.35));
				will-change: transform, opacity, filter;
			}
			.slide__image svg {
				display: block;
			}
			.slide__image--left {
				-webkit-transform: translate(0.75%, -10px);
				transform: translate(0.75%, -10px);
			}
			.slide__image--right {
				top: 5vmin;
				-webkit-transform: translate(-0.75%, 10px);
				transform: translate(-0.75%, 10px);
			}

			.slider__pagination {
				position: absolute;
				bottom: 7vh;
				width: 100%;
				text-align: center;
			}

			.button {
				position: relative;
				display: inline-block;
				padding: 20px 40px;
				border: 2px solid #fff;
				line-height: 1;
				font: 600 12px 'Montserrat', sans-serif;
				text-align: center;
				text-decoration: none;
				text-transform: uppercase;
				letter-spacing: 1.5px;
				color: white;
				-webkit-transition: all 0.25s ease;
				transition: all 0.25s ease;
				-webkit-appearance: none;
				-moz-appearance: none;
				appearance: none;
			}
			.button:hover {
				color: #333;
				background-color: white;
			}						

3. JAVASCRIPT

							window.location.href = "#slide-1";						



Mong bài viết giúp ích được các bạn phần nào trong thiết kế Web. Hãy nhấn nút để mọi người cùng học hỏi kiến thức mới nhé. Cảm ơn các bạn đã quan tâm Forum.