javascript圖片展示牆特效

来源:http://www.cnblogs.com/roucheng/archive/2016/02/17/jstupian.html
-Advertisement-
Play Games

查看效果:http://hovertree.com/code/javascript/pwl4bhoi.htm 代碼如下: 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html;


查看效果:http://hovertree.com/code/javascript/pwl4bhoi.htm

代碼如下:

  1 <!DOCTYPE html>
  2 <html>
  3 <head>
  4     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5     <title>何問起海報畫廊</title><base target="_blank" />
  6     <style type="text/css">
  7         * {
  8             padding: 0;
  9             margin: 0;
 10         }
 11 
 12         body {
 13             background-color: #333;
 14             color: yellowgreen;
 15             font-family: 'Avenir Next', 'Lantinghei SC';
 16             font-size: 14px;
 17             -webkit-font-smoothing: antialiased;
 18             -moz-osx-font-smoothing: grayscale;
 19         }
 20         a{color:yellow}
 21         .wrap {
 22             width: 100%;
 23             height: 600px;
 24             position: absolute;
 25             top: 50%;
 26             margin-top: -300px;
 27             background-color: #333;
 28             overflow: hidden;
 29             perspective: 800px;
 30             -webkit-perspective: 800px;
 31         }
 32 
 33         .photo {
 34             position: absolute;
 35             width: 260px;
 36             height: 320px;
 37             z-index: 1;
 38             box-shadow: 0 0 1px rgba(0, 0, 0, .01);
 39             transition: all .5s;
 40             -moz-transition: all .5s;
 41             -webkit-transition: all .5s;
 42             -o-transition: all .5s;
 43             left: 50%;
 44             top: 50%;
 45             margin: -160px 0 0 -130px;
 46         }
 47 
 48             .photo .photo-wrap .side {
 49                 position: absolute;
 50                 width: 100%;
 51                 height: 100%;
 52                 background-color: #eee;
 53                 top: 0;
 54                 right: 0;
 55                 padding: 20px;
 56                 box-sizing: border-box;
 57                 -moz-box-sizing:border-box;
 58                 backface-visibility: hidden;
 59                 -webkit-backface-visibility: hidden;
 60                 -moz-backface-visibility: hidden;
 61                 -ms-backface-visibility: hidden;
 62             }
 63 
 64             .photo .photo-wrap .side-front {
 65                 transform: rotateY(0deg);
 66                 -webkit-transform: rotateY(0deg);
 67                 -moz-transform: rotateY(0deg);
 68                 -o-transform: rotateY(0deg);
 69                 -ms-transform: rotateY(0deg);
 70             }
 71 
 72                 .photo .photo-wrap .side-front .image {
 73                     width: 100%;
 74                     height: 250px;
 75                     line-height: 250px;
 76                     overflow: hidden;
 77                 }
 78 
 79                     .photo .photo-wrap .side-front .image img {
 80                         width: 100%;
 81                         vertical-align: middle;
 82                     }
 83 
 84                 .photo .photo-wrap .side-front .caption {
 85                     text-align: center;
 86                     font-size: 16px;
 87                     line-height: 50px;
 88                 }
 89 
 90             .photo .photo-wrap .side-back {
 91                 transform: rotateY(180deg);
 92                 -webkit-transform: rotateY(180deg);
 93                 -moz-transform: rotateY(180deg);
 94                 -o-transform: rotateY(180deg);
 95                 -ms-transform: rotateY(180deg);
 96             }
 97 
 98                 .photo .photo-wrap .side-back .desc {
 99                     color: #666;
100                     font-size: 14px;
101                     line-height: 1.5em;
102                 }
103 
104         .photo_center {
105             top: 50%;
106             left: 50%;
107             margin: -160px 0 0 -130px;
108             z-index: 2;
109         }
110 
111         .photo .photo-wrap {
112             position: absolute;
113             width: 100%;
114             height: 100%;
115             transform-style: preserve-3d;
116             -webkit-transform-style: preserve-3d;
117             transition: all .6s ease-in-out;
118             -webkit-transition: all .6s ease-in-out;
119             -moz-transition: all .5s;
120             -o-transition: all .5s;
121             transform-origin: 0% 50% 0px;
122             -ms-transform-origin: 0% 50% 0px;
123             -o-transform-origin: 0% 50% 0px;
124             -webkit-transform-origin: 0% 50% 0px;
125             -moz-transform-origin: 0% 50% 0px;
126         }
127 
128         .photo_front .photo-wrap {
129             transform: translate(0px, 0px) rotateY(0deg);
130             -webkit-transform: translate(0px, 0px) rotateY(0deg);
131             -moz-transform: translate(0px, 0px) rotateY(0deg);
132             -o-transform: translate(0px, 0px) rotateY(0deg);
133             -ms-transform: translate(0px, 0px) rotateY(0deg);
134         }
135 
136         .photo_back .photo-wrap {
137             transform: translate(260px, 0px) rotateY(180deg);
138             -webkit-transform: translate(260px, 0px) rotateY(180deg);
139             -moz-transform: translate(260px, 0px) rotateY(180deg);
140             -o-transform: translate(260px, 0px) rotateY(180deg);
141             -ms-transform: translate(260px, 0px) rotateY(180deg);
142         }
143 
144         @font-face {
145             font-family: 'icomoon';
146             src: url('images/icomoon.woff') format('woff');
147             font-weight: normal;
148             font-size: normal;
149         }
150 
151         .nav {
152             position: absolute;
153             width: 80%;
154             left: 10%;
155             height: 30px;
156             line-height: 30px;
157             bottom: 20px;
158             z-index: 3;
159             text-align: center;
160         }
161 
162             .nav .i {
163                 display: inline-block;
164                 width: 30px;
165                 height: 30px;
166                 cursor: pointer;
167                 background-color: #aaa;
168                 text-align: center;
169                 border-radius: 50px;
170                 transform: scale(.5);
171                 -webkit-transform: scale(.5);
172                 -moz-transform: scale(.5);
173                 -o-transform: scale(.5);
174                 -ms-transform: scale(.5);
175                 transition: all .5s;
176                 -webkit-transition: all .5s;
177                 -moz-transition: all .5s;
178                 -o-transition: all .5s;
179             }
180 
181                 .nav .i:after {
182                     content: '\e965';
183                     font-family: 'icomoon';
184                     font-size: 80%;
185                     display: inline-block;
186                     line-height: 30px;
187                     text-align: center;
188                     color: #fff;
189                     opacity: 0;
190                 }
191 
192             .nav .i_current {
193                 transform: scale(1);
194                 -webkit-transform: scale(1);
195                 -moz-transform: scale(1);
196                 -o-transform: scale(1);
197                 -ms-transform: scale(1);
198             }
199 
200                 .nav .i_current:after {
201                     opacity: 1;
202                 }
203 
204             .nav .i_back {
205                 background-color: #555;
206                 transform: rotateY(180deg);
207                 -webkit-transform: rotateY(180deg);
208                 -moz-transform: rotateY(180deg);
209                 -o-transform: rotateY(180deg);
210                 -ms-transform: rotateY(180deg);
211             }
212         #wrap {color:#333
213         }
214     </style>
215 </head>
216 <body onselectstart="return false;" style="-moz-user-select:none;">
217     <div>何問起海報走廊 <a href="http://hoverteee.com">首頁</a> <a href="http://hoverteee.com/texiao/">特效</a> <a href="http://hovertree.com/code/javascript/pwl4bhoi.htm">代碼</a> <a href="http://hovertree.com/h/bjaf/punh2bn7.htm">註釋</a> <a href="http://hovertree.com/h/bjaf/h5aljrea.htm">下載</a></div>
218     <div class="wrap" id="wrap">何問起</div>
219     <script type="text/javascript" src="http://hovertree.com/texiao/js/15/images/data.js"></script>
220     <script type="text/javascript">
221         function g(selector) { return selector.substring(0, 1) == "." ? document.getElementsByClassName(selector.substring(1)) : document.getElementById(selector.substring(1)) } function random(range) { var min = Math.min(range[0], range[1]); var max = Math.max(range[0], range[1]); var diff = max - min; var number = Math.round(Math.random() * diff) + min; retur

您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • constructor屬性始終指向創建當前對象的構造函數。比如下麵例子: // 等價於 var foo = new Array(1, 56, 34, 12); var arr = [1, 56, 34, 12]; console.log(arr.constructor === Array); // 
  • 1.一列佈局 (一)一列自適應 自適應瀏覽器,隨著瀏覽器的拉伸而變化,一般寬度採用百分比的寫法,很簡<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title>一列佈局自適應</title> <style type="t
  • p[name]{background:red;} 只使用屬性名p[name=ghr]{background:red;} 指定屬性名,並指定了該屬性的屬性值p[name~=old]{background:red;}此屬性值是一個詞列表,並且以空格隔開,其中詞列表中包含了一個value詞p[name^=
  • [原文鏈接] https://www.huangwenchao.com.cn/2015/03/html5-image-preview.html 問題 加入我們在 HTML 裡面有一個圖片上傳控制項: <input id="upload_image" type="file" name="image" a
  • 心心念念的新年過完了~卻沒念到年會,更沒念到年終獎~哎,以任何理由不發年終獎的公司都是臭流氓~然,我們公司沒有理由,壓根兒就沒提這事,哇卡卡卡卡!!! ======================== 華麗麗的跳水線=========================== 年後第一天,公司人不多,閑來
  • Media Queries 詳解
  • 前段時間由於工作需要寫了一個純JS文本比較工具 在這裡與大家分享下 演算法有待優化,還希望大家多多指教 先上效果圖: 奉上源碼(把源碼保存為html格式的文件就可以直接運行了): 1 <!doctype html> 2 <html> 3 <head> 4 <title>文本比較工具</title> 5
  • 接觸 DeviceOne 要從15年11月開始說起了,因項目和產品時間需求接觸了快速開發平臺,DeviceOne是非常棒的一個平臺,雙向數據綁定,可以自定義指令,過濾器等等。總之非常好用完全超出了我們功能需求。之後我們使用了混合型開發平臺,沒有達到原生App的體驗和流暢,在頁面切換以及頁面滾動的時候
一周排行
    -Advertisement-
    Play Games
  • 前言 本文介紹一款使用 C# 與 WPF 開發的音頻播放器,其界面簡潔大方,操作體驗流暢。該播放器支持多種音頻格式(如 MP4、WMA、OGG、FLAC 等),並具備標記、實時歌詞顯示等功能。 另外,還支持換膚及多語言(中英文)切換。核心音頻處理採用 FFmpeg 組件,獲得了廣泛認可,目前 Git ...
  • OAuth2.0授權驗證-gitee授權碼模式 本文主要介紹如何筆者自己是如何使用gitee提供的OAuth2.0協議完成授權驗證並登錄到自己的系統,完整模式如圖 1、創建應用 打開gitee個人中心->第三方應用->創建應用 創建應用後在我的應用界面,查看已創建應用的Client ID和Clien ...
  • 解決了這個問題:《winForm下,fastReport.net 從.net framework 升級到.net5遇到的錯誤“Operation is not supported on this platform.”》 本文內容轉載自:https://www.fcnsoft.com/Home/Sho ...
  • 國內文章 WPF 從裸 Win 32 的 WM_Pointer 消息獲取觸摸點繪製筆跡 https://www.cnblogs.com/lindexi/p/18390983 本文將告訴大家如何在 WPF 裡面,接收裸 Win 32 的 WM_Pointer 消息,從消息裡面獲取觸摸點信息,使用觸摸點 ...
  • 前言 給大家推薦一個專為新零售快消行業打造了一套高效的進銷存管理系統。 系統不僅具備強大的庫存管理功能,還集成了高性能的輕量級 POS 解決方案,確保頁面載入速度極快,提供良好的用戶體驗。 項目介紹 Dorisoy.POS 是一款基於 .NET 7 和 Angular 4 開發的新零售快消進銷存管理 ...
  • ABP CLI常用的代碼分享 一、確保環境配置正確 安裝.NET CLI: ABP CLI是基於.NET Core或.NET 5/6/7等更高版本構建的,因此首先需要在你的開發環境中安裝.NET CLI。這可以通過訪問Microsoft官網下載並安裝相應版本的.NET SDK來實現。 安裝ABP ...
  • 問題 問題是這樣的:第三方的webapi,需要先調用登陸介面獲取Cookie,訪問其它介面時攜帶Cookie信息。 但使用HttpClient類調用登陸介面,返回的Headers中沒有找到Cookie信息。 分析 首先,使用Postman測試該登陸介面,正常返回Cookie信息,說明是HttpCli ...
  • 國內文章 關於.NET在中國為什麼工資低的分析 https://www.cnblogs.com/thinkingmore/p/18406244 .NET在中國開發者的薪資偏低,主要因市場需求、技術棧選擇和企業文化等因素所致。歷史上,.NET曾因微軟的閉源策略發展受限,儘管後來推出了跨平臺的.NET ...
  • 在WPF開發應用中,動畫不僅可以引起用戶的註意與興趣,而且還使軟體更加便於使用。前面幾篇文章講解了畫筆(Brush),形狀(Shape),幾何圖形(Geometry),變換(Transform)等相關內容,今天繼續講解動畫相關內容和知識點,僅供學習分享使用,如有不足之處,還請指正。 ...
  • 什麼是委托? 委托可以說是把一個方法代入另一個方法執行,相當於指向函數的指針;事件就相當於保存委托的數組; 1.實例化委托的方式: 方式1:通過new創建實例: public delegate void ShowDelegate(); 或者 public delegate string ShowDe ...