간단한 튜토리얼
이것은 순수 CSS3를 사용하여 간단하게 만든 멋진 전체 화면 반응형 슬라이드쇼 효과입니다. 이 슬라이드쇼 효과는 js 코드 없이 순수한 CSS를 사용하여 만들어졌습니다.
HTML 구조 사용 방법
이 순수 CSS3 전체 화면 반응형 슬라이드쇼의 HTML 구조는 다음과 같습니다.
<div class="wrap"> <header> <label for="slide-1-trigger">Slide One</label> <label for="slide-2-trigger">Slide Two</label> <label for="slide-3-trigger">Slide Three</label> <label for="slide-4-trigger">Slide Four</label> </header> <input id="slide-1-trigger" type="radio" name="slides" checked> <section class="slide slide-one"> <h1 id="Headline-nbsp-One">Headline One</h1> </section> <input id="slide-2-trigger" type="radio" name="slides"> <section class="slide slide-two"> <h1 id="Headline-nbsp-Two">Headline Two</h1> </section> <input id="slide-3-trigger" type="radio" name="slides"> <section class="slide slide-three"> <h1 id="Headline-nbsp-Three">Headline Three</h1> </section> <input id="slide-4-trigger" type="radio" name="slides"> <section class="slide slide-four"> <h1 id="Headline-nbsp-Four">Headline Four</h1> </section> </div>
CSS 스타일
이 순수 CSS3 전체 화면 반응형 슬라이드쇼의 주요 CSS 스타일은 다음과 같습니다.
.wrap { width: 100%; height: 100%; position: relative; overflow: hidden; background: #120103; color: #fff; text-align: center; } header { background: #3E474F; box-shadow: 0 .5em 1em #111; position: absolute; top: 0; left: 0; z-index: 900; width: 100%; } header label { color: #788188; cursor: pointer; display: inline-block; line-height: 4.25em; font-size: .667em; font-weight: bold; padding: 0 1em; } header label:hover { background: #2e353b; } .slide { width: 100%; height: 100%; position:absolute; top: 0; left: 100%; z-index: 10; padding: 8em 1em 0; background-color: #120103; background-position: 50% 50%; background-size:cover; transition: left 0s .75s; } .slide-one { background-image: url('../images/starryFarm.jpg'); } .slide-two { background-image: url('../images/campusDarkDays.jpg'); } .slide-three { background-image: url('../images/autumn.jpg'); } .slide-four { background-image: url('../images/lakehouse.jpg'); } /* So all that is left to do is to target this text state. We are going to use an attribute selector to select any input that has an ID that starts with slide. Then we will further qualify the selector by adding the pseudo-class of "checked" */ /* This will target any of our radio inputs as they all begin with "slide" Then by using the adjacent sibling combinator which is the "+" sign, we can finally target our slide.*/ [id^="slide"]:checked + .slide { left: 0; /* When our radio element is checked, we want to position our slide back on the left corner of our wrapper, so we will set left to zero */ z-index: 100; /* we wanna raise the z-index to 100, to be sure our slide is on top of the previous one. */ transition: left .65s ease-out; } .slide h1 { opacity: 0; transform: translateY(100%); transition: transform .5s .5s, opacity .5s; /* This transition will allow us to see the opacity go down to zero, but it will delay the transform until the next slide is already covering it.*/ } [id^="slide"]:checked + .slide h1 { /* Now we target our headline when our input is in its checked state */ opacity: 1; transform: translateY(0); transition: all .5s .5s; /* This will have our headline appearing and rising as the slide is coming onto the screen. */ }
위는 순수 CSS3 전체 화면 반응형 슬라이드쇼 효과의 내용입니다. PHP 중국어 웹사이트(www.php.cn)를 주목하세요!

나는 다른 날이 질문을 받았다. 나의 첫 번째 생각은 : 이상한 질문입니다! 특이성은 선택기에 관한 것이며 At-Rules는 선택기가 아니므로 ... 무의미합니까?

그렇습니다. 당신은 할 수 있습니다. 그리고 그것은 실제로 어떤 순서로 중요하지 않습니다. CSS 전 처리기가 필요하지 않습니다. 일반 CSS에서 작동합니다.

CSS 및 JavaScript (및 이미지 및 글꼴 등)와 같은 자산에 멀리 떨어진 캐시 헤더를 설정해야합니다. 브라우저를 알려줍니다

많은 개발자들은 CSS 코드베이스를 유지하는 방법에 대해 글을 썼지 만 코드베이스의 품질을 어떻게 측정하는지에 대해 많은 글을 쓰지 않습니다. 물론, 우리는 가지고 있습니다

짧고 임의의 텍스트를 수락 해야하는 양식이 있습니까? 이름이나 다른 것 같습니다. 정확히 무엇을위한 것입니다. 많은 것이 있습니다

나는 프론트 컨퍼런스를 위해 스위스 취리히로 향하게되어 매우 기쁩니다 (그 이름과 URL을 사랑합니다!). 나는 전에 스위스에 가본 적이 없기 때문에 나는 흥분했다

소프트웨어 개발에서 제가 가장 좋아하는 개발 중 하나는 서버리스의 출현이었습니다. 세부 사항에 푹 빠지는 경향이있는 개발자로서

이 게시물에서는 들어오는 데이터를 위해 동적 경로를 만드는 방법을 보여주기 위해 NetLify에 구축하고 배포 한 전자 상거래 상점 데모를 사용합니다. 상당히입니다


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SecList
SecLists는 최고의 보안 테스터의 동반자입니다. 보안 평가 시 자주 사용되는 다양한 유형의 목록을 한 곳에 모아 놓은 것입니다. SecLists는 보안 테스터에게 필요할 수 있는 모든 목록을 편리하게 제공하여 보안 테스트를 더욱 효율적이고 생산적으로 만드는 데 도움이 됩니다. 목록 유형에는 사용자 이름, 비밀번호, URL, 퍼징 페이로드, 민감한 데이터 패턴, 웹 셸 등이 포함됩니다. 테스터는 이 저장소를 새로운 테스트 시스템으로 간단히 가져올 수 있으며 필요한 모든 유형의 목록에 액세스할 수 있습니다.

PhpStorm 맥 버전
최신(2018.2.1) 전문 PHP 통합 개발 도구

Atom Editor Mac 버전 다운로드
가장 인기 있는 오픈 소스 편집기

ZendStudio 13.5.1 맥
강력한 PHP 통합 개발 환경
