整合營(yíng)銷服務(wù)商

          電腦端+手機(jī)端+微信端=數(shù)據(jù)同步管理

          免費(fèi)咨詢熱線:

          常見的css3圖片hover懸浮效果都在這了,一共15種

          圖網(wǎng)在做web前端項(xiàng)目切圖的時(shí)候,圖片的地方經(jīng)常會(huì)加一點(diǎn)懸停效果,最最常見的是,鼠標(biāo)移上去,圖片稍微放大一點(diǎn)點(diǎn),這樣可能增強(qiáng)體驗(yàn),增加互動(dòng)。

          下面整理了15中css3圖片Hover懸停效果,基本你能想到的效果都在這了。


          使用方法

          1、在head區(qū)域引入樣式表文件normalize.css、demo.css、component.css

          2、選取你想要的效果:<figure class="effect-lily"> …… </figure>為一個(gè)單元效果

          3、3個(gè)css文件可根據(jù)你的需要做適當(dāng)精簡(jiǎn)

          演示

          http://www.qietu.com.cn

          果一

          效果二

          效果三

          效果四

          效果五

          效果六

          由于代碼過長(zhǎng)需要文檔版源碼來我的前端群581549454,已上傳到群文件

          CSS源碼:

          body {

          font-family:arial;

          background: #222;

          margin-top:30px;

          }

          言:

          圣誕節(jié)快到了,是不是要給女朋友或者正在追求的妹子一點(diǎn)小驚喜呢,今天這篇博客就分享下前端代碼如何實(shí)現(xiàn)3D立體動(dòng)態(tài)相冊(cè)。趕緊學(xué)會(huì)了,來制作屬于我們程序員的浪漫吧!先上效果圖,來引起下你們的興趣。

          正文:

          一、新建一個(gè)index.html的文件,代碼如下

          <!DOCTYPE html>
          <html lang="en">
          <head>
          <meta charset="UTF-8">
          <title>純CSS實(shí)現(xiàn)鼠標(biāo)經(jīng)過3D立體動(dòng)態(tài)展示圖片特效代碼</title>
          <link type="text/css" href="css/style.css" rel="stylesheet" />
          </head>
          <body>
          <div class="box">
          	<ul class="minbox">
          		<li></li>
          		<li></li>
          		<li></li>
          		<li></li>
          		<li></li>
          		<li></li>
          	</ul>
          	<ol class="maxbox">
          		<li></li>
          		<li></li>
          		<li></li>
          		<li></li>
          		<li></li>
          		<li></li>
          	</ol>
          </div>
          </body>
          </html>

          二、css樣式的代碼

          @charset "utf-8";
          *{
          	margin:0;
          	padding:0;
          }
          body{
          	max-width: 100%;
          	min-width: 100%;
          	height: 100%;
          	background-size: cover;
          	background-repeat: no-repeat;
          	background-attachment: fixed;
          	background-size:100% 100%;
          	position: absolute;
          	margin-left: auto;
          	margin-right: auto;
          }
          li{
          	list-style: none;
          }
          .box{
          	width:200px;
          	height:200px;
          	background-size: cover;
          	background-repeat: no-repeat;
          	background-attachment: fixed;
          	background-size:100% 100%;
          	position: absolute;
          	margin-left: 42%;
          	margin-top: 22%;
          	-webkit-transform-style:preserve-3d;
          	-webkit-transform:rotateX(13deg);
          	-webkit-animation:move 5s linear infinite;
          }
          .minbox{
          	width:100px;
          	height:100px;
          	position: absolute;
          	left:50px;
          	top:30px;
          	-webkit-transform-style:preserve-3d;
          }
          .minbox li{
          	width:100px;
          	height:100px;
          	position: absolute;
          	left:0;
          	top:0;
          }
          .minbox li:nth-child(1){
          	background: url(../img/01.png) no-repeat 0 0;
          	-webkit-transform:translateZ(50px);
          }
          .minbox li:nth-child(2){
          	background: url(../img/02.png) no-repeat 0 0;
          	-webkit-transform:rotateX(180deg) translateZ(50px);
          }
          .minbox li:nth-child(3){
          	background: url(../img/03.png) no-repeat 0 0;
          	-webkit-transform:rotateX(-90deg) translateZ(50px);
          }
          .minbox li:nth-child(4){
          	background: url(../img/04.png) no-repeat 0 0;
          	-webkit-transform:rotateX(90deg) translateZ(50px);
          }
          .minbox li:nth-child(5){
          	background: url(../img/05.png) no-repeat 0 0;
          	-webkit-transform:rotateY(-90deg) translateZ(50px);
          }
          .minbox li:nth-child(6){
          	background: url(../img/06.png) no-repeat 0 0;
          	-webkit-transform:rotateY(90deg) translateZ(50px);
          }
          .maxbox li:nth-child(1){
          	background: url(../img/1.png) no-repeat 0 0;
          	-webkit-transform:translateZ(50px);
          }
          .maxbox li:nth-child(2){
          	background: url(../img/2.png) no-repeat 0 0;
          	-webkit-transform:translateZ(50px);
          }
          .maxbox li:nth-child(3){
          	background: url(../img/3.png) no-repeat 0 0;
          	-webkit-transform:rotateX(-90deg) translateZ(50px);
          }
          .maxbox li:nth-child(4){
          	background: url(../img/4.png) no-repeat 0 0;
          	-webkit-transform:rotateX(90deg) translateZ(50px);
          }
          .maxbox li:nth-child(5){
          	background: url(../img/5.png) no-repeat 0 0;
          	-webkit-transform:rotateY(-90deg) translateZ(50px);
          }
          .maxbox li:nth-child(6){
          	background: url(../img/6.png) no-repeat 0 0;
          	-webkit-transform:rotateY(90deg) translateZ(50px);
          }
          .maxbox{
          	width: 800px;
          	height: 400px;
          	position: absolute;
          	left: 0;
          	top: -20px;
          	-webkit-transform-style: preserve-3d;
          	
          }
          .maxbox li{
          	width: 200px;
          	height: 200px;
          	background: #fff;
          	border:1px solid #ccc;
          	position: absolute;
          	left: 0;
          	top: 0;
          	opacity: 0.2;
          	-webkit-transition:all 1s ease;
          }
          .maxbox li:nth-child(1){
          	-webkit-transform:translateZ(100px);
          }
          .maxbox li:nth-child(2){
          	-webkit-transform:rotateX(180deg) translateZ(100px);
          }
          .maxbox li:nth-child(3){
          	-webkit-transform:rotateX(-90deg) translateZ(100px);
          }
          .maxbox li:nth-child(4){
          	-webkit-transform:rotateX(90deg) translateZ(100px);
          }
          .maxbox li:nth-child(5){
          	-webkit-transform:rotateY(-90deg) translateZ(100px);
          }
          .maxbox li:nth-child(6){
          	-webkit-transform:rotateY(90deg) translateZ(100px);
          }
          .box:hover ol li:nth-child(1){
          	-webkit-transform:translateZ(300px);
          	width: 400px;
          	height: 400px;
          	opacity: 0.8;
          	left: -100px;
          	top: -100px;
          }
          .box:hover ol li:nth-child(2){
          	-webkit-transform:rotateX(180deg) translateZ(300px);
          	width: 400px;
          	height: 400px;
          	opacity: 0.8;
          	left: -100px;
          	top: -100px;
          }
          .box:hover ol li:nth-child(3){
          	-webkit-transform:rotateX(-90deg) translateZ(300px);
          	width: 400px;
          	height: 400px;
          	opacity: 0.8;
          	left: -100px;
          	top: -100px;
          }
          .box:hover ol li:nth-child(4){
          	-webkit-transform:rotateX(90deg) translateZ(300px);
          	width: 400px;
          	height: 400px;
          	opacity: 0.8;
          	left: -100px;
          	top: -100px;
          }
          .box:hover ol li:nth-child(5){
          	-webkit-transform:rotateY(-90deg) translateZ(300px);
          	width: 400px;
          	height: 400px;
          	opacity: 0.8;
          	left: -100px;
          	top: -100px;
          }
          .box:hover ol li:nth-child(6){
          	-webkit-transform:rotateY(90deg) translateZ(300px);
          	width: 400px;
          	height: 400px;
          	opacity: 0.8;
          	left: -100px;
          	top: -100px;
          }
          @keyframes move{
          	0%{
          		-webkit-transform: rotateX(13deg) rotateY(0deg);
          	}
          	100%{
          		-webkit-transform:rotateX(13deg) rotateY(360deg);
          	}
          }

          三、文件的目錄結(jié)構(gòu),把css文件放到css文件夾里,圖片放到img文件夾里。

          四、圖片尺寸不會(huì)修改的,可以選擇使用美圖秀秀網(wǎng)頁版很簡(jiǎn)單

          五、容易出現(xiàn)的問題 ,圖片展示不全或展示的方向不對(duì)

          1.圖片尺寸需要修改 (解決展示不全的情況)

          上圖是我的圖片文件夾里放的圖片 ,首先01-06編號(hào)命名的圖片尺寸是100x100px的大小的,1-6編號(hào)是400x400px,如果效果想展示最佳,100x100px的圖片是以頭部特寫的照片最好,因?yàn)?1-06是立體照片內(nèi)部小正方體的照片,1-6編號(hào)是外部正方體的照片。

          2.圖片的方向需要修改(解決頭朝下的問題)

          修改的方向如上圖展示所示,比如第三張頭就應(yīng)該朝下,否則形成的效果圖像會(huì)出現(xiàn)頭是倒著的情況。

          六、放一下動(dòng)態(tài)效果圖

          總結(jié):

          生活雖然總有辛酸,但是我們不應(yīng)該減少去創(chuàng)造生活的樂趣,不斷尋找屬于自己的那份快樂,才應(yīng)該是我們生活的態(tài)度。

          我自己是一名從事了多年開發(fā)的web前端老程序員,目前辭職在做自己的web前端私人定制課程,今年年初我花了一個(gè)月整理了一份最適合2019年學(xué)習(xí)的web前端學(xué)習(xí)干貨,各種框架都有整理,送給每一位前端小伙伴,想要獲取的可以關(guān)注我的頭條號(hào)并在后臺(tái)私信我:前端,即可免費(fèi)獲取。

          原文鏈接:https://blog.csdn.net/jdk_wangtaida/article/details/103253883


          主站蜘蛛池模板: 偷拍精品视频一区二区三区| 一区视频免费观看| 一区五十路在线中出| 日韩精品一区二区三区中文| 国精产品一区一区三区MBA下载 | 国产内射在线激情一区| 国产一区二区在线| 亚洲av福利无码无一区二区| 麻豆一区二区三区蜜桃免费| 在线精品视频一区二区| 日韩精品在线一区二区| 亚洲av高清在线观看一区二区| 色婷婷av一区二区三区仙踪林| 国产一区二区电影| 久久国产精品一区| 亚洲一区二区三区在线视频| 国产精品一区不卡| 欧美一区内射最近更新| 亚洲一区二区三区久久| 午夜DV内射一区二区| 国产亚洲一区二区三区在线观看| 国产另类ts人妖一区二区三区| 日韩一区二区三区在线精品| 日韩一区在线视频| 婷婷亚洲综合一区二区| 冲田杏梨AV一区二区三区| 亚洲视频一区二区三区四区| 久久国产精品无码一区二区三区 | 日本无码一区二区三区白峰美| 人妻久久久一区二区三区| 亚洲国产精品一区二区成人片国内 | 日韩AV片无码一区二区不卡| 玩弄放荡人妻一区二区三区| 蜜芽亚洲av无码一区二区三区| 一区国产传媒国产精品| 亚洲国产精品一区二区三区在线观看| 91在线视频一区| 亚洲乱码一区二区三区国产精品| 天堂va在线高清一区| 亚洲AV网一区二区三区| 日韩视频一区二区在线观看|