JS 코드를 사용하지 않고 순수 CSS3를 사용하여 전체 화면 배경 전환 초점 이미지 효과를 제공하려면 간단하고 이해하기 쉽고 필요한 친구가 직접 이동할 수 있습니다.
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>自适应全屏焦点图切换CSS3特效代码</title> <meta name="keywords" content="自适应,全屏,焦点图,切换,CSS3,特效代码" /> <meta name="description" content="自适应全屏焦点图切换CSS3特效代码,纯CSS实现不用任何js代码。" /> <style> *{margin:0;padding:0;list-style: none;} img.bg{min-width: 1024px;min-height: 100%;width: 100%;height: auto!important;height: 100%;position: fixed;top: 0;left: 0;z-index: 1;} @media screen and (max-width: 1024px) { img.bg{ left: 50%; margin-left: -512px; } } .slider{ position: absolute; width: 100%; text-align: center; z-index: 999; bottom: 100px; } .slider li{ display: inline-block; width: 170px; height: 130px; margin-right: 15px; } .slider a{ display: inline-block; width: 170px; padding-top:70px; padding-bottom:20px; position: relative; cursor: pointer; border:2px solid #fff; border-radius: 5px; vertical-align: top;/*设置元素的垂直对齐方式。*/ color: #FFFFFF; text-decoration: none; font-size: 22px; font-family: "楷体"; text-shadow: -1px -1px 1px rgba(0,0,0,0.8), -2px -2px 1px rgba(0, 0, 0, 0.3), -3px -3px 1px rgba(0, 0, 0, 0.3); } .slider li:nth-of-type(1) a{ background-color: #02646e; } .slider li:nth-of-type(2) a{ background-color: #eb0837; } .slider li:nth-of-type(3) a { background-color: #67b374; } .slider li:nth-of-type(4) a { background-color: #e6674a; } .slider li:nth-of-type(5) a { background-color: #e61061; } .slider a::after{/*:after 选择器在被选元素的内容后面插入内容。*/ content: ""; display: block; height: 120px; width: 120px; border:5px solid #fff; border-radius: 50%; position: absolute; left: 50%; margin-left: -60px; z-index: 9999; top: -80px; } .slider li:nth-of-type(1) a::after { /*:nth-of-type(n) 选择器匹配属于父元素的特定类型的第 N 个子元素的每个元素.*/ background: url(img/sbg1.jpg) no-repeat center; } .slider li:nth-of-type(2) a::after { background: url(img/sbg2.jpg) no-repeat center; } .slider li:nth-of-type(3) a::after { background: url(img/sbg3.jpg) no-repeat center; } .slider li:nth-of-type(4) a::after { background: url(img/sbg4.jpg) no-repeat center; } .slider li:nth-of-type(5) a::after { background: url(img/sbg5.jpg) no-repeat center; } .slider a::before{ content: ""; display: block; height: 120px; width: 120px; border:5px solid #fff; border-radius: 50%; position: absolute; left: 50%; margin-left: -60px; z-index: 99999; top: -80px; background:rgba(0,0,0,0.3); } .slider a:hover::before{ opacity: 0; } @-webkit-keyframes 'slideLeft'{ 0%{ left:-500px; } 100%{ left:0; } } .slideLeft:target{ /*:target 选择器可用于选取当前活动的目标元素*/ z-index: 100; animation: slideLeft 1s 1; -webkit-animation: slideLeft 1s 1; } @-webkit-keyframes 'slideBottom'{ 0%{ top:350px; } 100%{ top:0; } } .slideBottom:target{ /*:target 选择器可用于选取当前活动的目标元素*/ z-index: 100; animation: slideBottom 1s 1; -webkit-animation: slideBottom 1s 1; } @-webkit-keyframes 'zoomIn' { 0% { -webkit-transform: scale(0.1); } 100% { -webkit-transform: none; } } .zoomIn:target { z-index: 100; -webkit-animation: zoomIn 1s 1; animation: zoomIn 1s 1; } /* Zoom Out */ @-webkit-keyframes 'zoomOut' { 0% { -webkit-transform: scale(2); } 100% { -webkit-transform: none; } } .zoomOut:target { z-index: 100; -webkit-animation: zoomOut 1s 1; animation: zoomOut 1s 1; } /* Rotate */ @-webkit-keyframes 'rotate' { 0% { -webkit-transform: rotate(-360deg) scale(0.1); } 100% { -webkit-transform: none; } } .rotate:target { z-index: 100; -webkit-animation: rotate 1s 1; animation: rotate 1s 1; } @-webkit-keyframes 'notTarget' { 0% { z-index: 75; } 100% { z-index: 75; } } .bg:not(:target) { -webkit-animation: notTarget 1s 1; animation: notTarget 1s 1 } .page { text-align:left; } </style> </head> <body> <div> <ul> <li><a href="#bg1">Hipster Fashion Haircut</a></li> <li><a href="#bg2">Cloud Computing Services & Consulting</a></li> <li><a href="#bg3">My haire is sooo fantastic!</a></li> <li><a href="#bg4">Eat healthy & excersice!</a></li> <li><a href="#bg5">Lips so kissable I could die ...</a></li> </ul> </div> <img class="bg slideLeft lazy" src="/static/imghwm/default1.png" data-src="img/bg1.jpg" id="bg1" / alt="CSS3 적응형 전체 화면 초점 이미지 전환 특수 효과를 만드는 방법" > <img class="bg slideBottom lazy" src="/static/imghwm/default1.png" data-src="img/bg2.jpg" id="bg2" / alt="CSS3 적응형 전체 화면 초점 이미지 전환 특수 효과를 만드는 방법" > <img class="bg zoomIn lazy" src="/static/imghwm/default1.png" data-src="img/bg3.jpg" id="bg3" / alt="CSS3 적응형 전체 화면 초점 이미지 전환 특수 효과를 만드는 방법" > <img class="bg zoomOut lazy" src="/static/imghwm/default1.png" data-src="img/bg4.jpg" id="bg4" / alt="CSS3 적응형 전체 화면 초점 이미지 전환 특수 효과를 만드는 방법" > <img class="bg rotate lazy" src="/static/imghwm/default1.png" data-src="img/bg5.jpg" id="bg5" / alt="CSS3 적응형 전체 화면 초점 이미지 전환 특수 효과를 만드는 방법" > </body> </html>
를 살펴보겠습니다. 적응형 전체 화면 초점 맵 전환을 위한 특수 효과가 너무 많습니다. 더 흥미로운 내용을 보려면 PHP 중국어 웹사이트의 다른 관련 기사를 주목하세요!
관련 읽기:
위 내용은 CSS3 적응형 전체 화면 초점 이미지 전환 특수 효과를 만드는 방법의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

两种方法:1、利用display属性,只需给元素添加“display:none;”样式即可。2、利用position和top属性设置元素绝对定位来隐藏元素,只需给元素添加“position:absolute;top:-9999px;”样式。

怎么制作文字轮播与图片轮播?大家第一想到的是不是利用js,其实利用纯CSS也能实现文字轮播与图片轮播,下面来看看实现方法,希望对大家有所帮助!

实现方法:1、使用“:active”选择器选中鼠标点击图片的状态;2、使用transform属性和scale()函数实现图片放大效果,语法“img:active {transform: scale(x轴放大倍数,y轴放大倍数);}”。

css3中的动画效果有变形;可以利用“animation:动画属性 @keyframes ..{..{transform:变形属性}}”实现变形动画效果,animation属性用于设置动画样式,transform属性用于设置变形样式。

自适应布局又称“响应式布局”,是指可以自动识别屏幕宽度、并做出相应调整的网页布局;这样的网页能够兼容多个不同的终端,而不是为每个终端做一个特定的版本。自适应布局是为解决移动端浏览网页而诞生的,能够为使用不同终端的用户提供很好的用户体验。

在css3中,可以利用“animation-timing-function”属性设置动画旋转速度,该属性用于指定动画将如何完成一个周期,设置动画的速度曲线,语法为“元素{animation-timing-function:速度属性值;}”。

css3线性渐变可以实现三角形;只需创建一个45度的线性渐变,设置渐变色为两种固定颜色,一个是三角形的颜色,另一个为透明色即可,语法“linear-gradient(45deg,颜色值,颜色值 50%,透明色 50%,透明色 100%)”。

本篇文章带大家一起深入了解一下CSS3中的新特性::target-text 选择器,聊聊该选择器的作用和使用方法,希望对大家有所帮助!


핫 AI 도구

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

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

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

Clothoff.io
AI 옷 제거제

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

인기 기사

뜨거운 도구

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

DVWA
DVWA(Damn Vulnerable Web App)는 매우 취약한 PHP/MySQL 웹 애플리케이션입니다. 주요 목표는 보안 전문가가 법적 환경에서 자신의 기술과 도구를 테스트하고, 웹 개발자가 웹 응용 프로그램 보안 프로세스를 더 잘 이해할 수 있도록 돕고, 교사/학생이 교실 환경 웹 응용 프로그램에서 가르치고 배울 수 있도록 돕는 것입니다. 보안. DVWA의 목표는 다양한 난이도의 간단하고 간단한 인터페이스를 통해 가장 일반적인 웹 취약점 중 일부를 연습하는 것입니다. 이 소프트웨어는

VSCode Windows 64비트 다운로드
Microsoft에서 출시한 강력한 무료 IDE 편집기

SublimeText3 영어 버전
권장 사항: Win 버전, 코드 프롬프트 지원!

Eclipse용 SAP NetWeaver 서버 어댑터
Eclipse를 SAP NetWeaver 애플리케이션 서버와 통합합니다.

뜨거운 주제



