果圖
今天給大家帶來的是 CSS3圖片翻頁動畫(10種動畫)!
豐富一下列位的特效儲備庫!
文件版源碼獲取,請看評論區!
廢話不多說,上源碼!
@import url(http://fonts.googleapis.com/css?family=Lato:400,700);
@font-face {
font-family: 'codropsicons';
src:url('../fonts/codropsicons/codropsicons.eot');
src:url('../fonts/codropsicons/codropsicons.eot?#iefix') format('embedded-opentype'),
url('../fonts/codropsicons/codropsicons.woff') format('woff'),
url('../fonts/codropsicons/codropsicons.ttf') format('truetype'),
url('../fonts/codropsicons/codropsicons.svg#codropsicons') format('svg');
font-weight: normal;
font-style: normal;
}
body {
background: #81c439;
color: #fff;
font-family: 'Lato', Arial, sans-serif;
}
.clearfix:before,
.clearfix:after {
content: '';
display: table;
}
.clearfix:after {
clear: both;
}
a {
color: rgba(255,255,255,0.7);
text-decoration: none;
outline: none;
}
a:hover,
a:focus {
color: #fff
}
.container > header {
margin: 0 auto;
padding: 2em 15% 0;
text-align: center;
}
.container > header h1 {
font-size: 1.8em;
line-height: 1.3;
margin: 0;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 2px;
word-spacing: 5px;
}
.container > header span {
display: block;
font-size: 60%;
opacity: 0.7;
padding: 0 0 0.6em 0.1em;
}
/* To Navigation Style */
.codrops-top {
background: rgba(255, 255, 255, 0.1);
text-transform: uppercase;
width: 100%;
font-size: 0.69em;
line-height: 2.2;
font-weight: 700;
}
.codrops-top a {
text-decoration: none;
padding: 0 1em;
letter-spacing: 0.1em;
display: inline-block;
}
.codrops-top a:hover {
background: rgba(255,255,255,0.95);
color: #81c439;
}
.codrops-top span.right {
float: right;
}
.codrops-top span.right a {
float: left;
display: block;
}
.codrops-icon:before {
font-family: 'codropsicons';
margin: 0 4px;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
.codrops-icon-drop:before {
content: "\e001";
}
.codrops-icon-prev:before {
content: "\e004";
}
/* Demo Buttons Style */
.codrops-demos {
padding-top: 1em;
max-width: 700px;
margin: 0 auto;
}
.codrops-demos a {
text-decoration: none;
outline: none;
display: inline-block;
font-weight: 700;
text-transform: uppercase;
font-size: 0.8em;
margin: 0.5em 0.4em;
letter-spacing: 1px;
background: rgba(0,0,0,0.1);
padding: 0.4em 0.9em;
-webkit-transition: all 0.2s;
transition: all 0.2s;
}
.codrops-demos a.current-demo,
.codrops-demos a:hover,
.codrops-demos a:focus {
opacity: 1;
background: rgba(0,0,0,0.25);
}
section {
text-align: center;
font-size: 150%;
padding: 1em 1% 2em;
}
@media screen and (max-width: 25em) {
.codrops-icon span {
display: none;
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animations for Thumbnail Grids | Demo 1</title>
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<!--必要樣式-->
<link rel="stylesheet" type="text/css" href="css/component.css" />
<script src="js/modernizr.custom.js"></script>
</head>
<body>
<div>
<header>
<h1>網格縮略圖動畫</h1>
<nav>
<a href="index.html">Fall</a>
<a href="index2.html">Slide</a>
<a href="index3.html">Rotate Fall</a>
<a href="index4.html">Rotate Scale</a>
<a href="index5.html">Stack</a>
<a href="index6.html">3d Flip</a>
<a href="index7.html">Bring back</a>
<a href="index8.html">Superscale</a>
<a href="index9.html">Center Flip</a>
<a href="index10.html">Front Row</a>
</nav>
</header>
<section>
<ul class="tt-grid tt-effect-fall tt-effect-delay">
<li><a href="#"><img src="img/1.jpg" alt="img01"/></a></li>
<li><a href="#"><img src="img/2.jpg" alt="img02"/></a></li>
<li><a href="#"><img src="img/3.jpg" alt="img03"/></a></li>
<li><a href="#"><img src="img/4.jpg" alt="img04"/></a></li>
<li><a href="#"><img src="img/5.jpg" alt="img05"/></a></li>
<li><a href="#"><img src="img/6.jpg" alt="img06"/></a></li>
</ul>
<nav>
<a></a><a></a><a></a><a></a>
</nav>
</section>
</div><!-- /container -->
<script src="js/classie.js"></script>
<script src="js/thumbnailGridEffects.js"></script>
</body>
</html>
、創建項目
1、創建Maven項目
2、添加依賴
在pom.xml中添加依賴配置,具體如下:
[html] view plain copy
二、具體實現
1、獲取視頻中間的幀作為縮略圖,并返回縮略圖實際存放地址
[java] view plain copy
ello大家好,今天廣州藍景跟大家分享一些html的使用技巧。
1. 使用capture屬性打開設備攝像頭
正如input標簽具有email、text和password屬性一樣,我們也可以通過一些屬性打開移動設備的攝像頭以捕獲圖像。
那就是capture屬性,屬性值有兩個:
<input type="file" capture="user" accept="image/*">
2. 網站自動刷新
你可以在head標簽中將網站設置為定時刷新!
<head>
<meta http-equiv="refresh" content="10">
</head>
此代碼段可以實現每10秒刷新一次網站。
3. 激活拼寫檢查
你可以使用HTML的spellcheck屬性并將其設置為true以激活拼寫檢查。使用lang屬性指定待檢查的語言。
<input type="text" spellcheck="true" lang="en">
這是一個標準屬性,得到了大多數瀏覽器的支持。
4. 指定要上傳的文件類型
你可以使用accept屬性在input標簽中指定允許用戶上傳的文件類型。
<input type="file" accept=".jpeg,.png">
5. 阻止瀏覽器翻譯
將translate屬性設置為no會阻止瀏覽器翻譯該內容。如果你不想翻譯某個短語或單詞,例如logo、公司或品牌名稱,那就可以應用這個屬性。
<p translate="no">Brand name</p>
6. 在input標簽中輸入多個項目
這可以通過multiple屬性來完成。
<input type="file" multiple>
適用于文件和電子郵件。如果是電子郵件,則可以用逗號分隔。
7. 為視頻創建海報(縮略圖)
使用poster屬性,我們可以在視頻加載時,或者在用戶點擊播放按鈕之前,顯示指定的縮略圖。
如果不指定圖片,則默認使用視頻的第一幀作為縮略圖。
<video poster="picture.png"></video>
8. 點擊鏈接自動下載
如果你希望在單擊目標資源的鏈接時下載特定資源,那就添加download屬性。
<a href="image.png" download>
今天就分享到這里,想要了解更多前端技術知識,可以關注我們廣州藍景。
*請認真填寫需求信息,我們會在24小時內與您取得聯系。