CSS3勉強記(1) - 色褪せたtext_html/css_WEB-ITnose
今日はここ数日で学んだことを共有する時間があります。どれも単純なことですが、千マイルの旅は一歩から始まります。私はゆっくりと歩いていますが、前進を止めていません。 ~~~~
私が作成した「フェードテキスト」の最終的な動的効果を見てみましょう:
上記のアニメーション効果を作成するプロセスは次のとおりです:
(1) まず、透明度を変更してアニメーションをカスタマイズします。 0 から 1 までを変更し、アニメーションでこのアニメーション効果を呼び出します
(2) テキストの異なる行が表示される時間に注意してください。これはアニメーションの遅延属性によって実現できます
(3) 最終的なダイナミックを指定します。テキストの値はアニメーションの最終的な表示状態です。そうでない場合、テキストは自動的に消えた後に表示されません。これは、animation-fill-mode で実現できます
1. まず HTML でプログラムを見てみましょう。
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title>淡入的文字</title> <link type="text/css" rel="stylesheet" href="css/animate.css" /> </head> <body> <div class="fade-in-words"> <div class="first-words">山一程,水一程,</div> <div class="second-words">身向榆关那畔行,</div> <div class="third-words">夜深千帐灯。</div> <div class="four-words">风一更,雪一更,</div> <div class="five-words">聒碎乡心梦不成,</div> <div class="six-words">故园无此声。</div> </div> </body></html>
上のプログラムは主に最初に詩を見つけました。La~~~~~それが何を意味するかは推測しないでください
次に、CSS スタイル (主に CSS3) を見てください。 )
.fade-in-words{ width: 200px; margin: 0 auto; text-align: center;}/*自定义一个透明度从0到1的动画,它的名称是fade-in*/@keyframes fade-in{ 0%{ opacity: 0;} 100%{opacity:1;}}@-webkit-keyframes fade-in{ 0%{ opacity: 0;} 100%{opacity:1;}}@-ms-keyframes fade-in{ 0%{ opacity: 0;} 100%{opacity:1;}}@-o-keyframes fade-in{ 0%{ opacity: 0;} 100%{opacity:1;}}@-moz-keyframes fade-in{ 0%{ opacity: 0;} 100%{opacity:1;}}.first-words{ opacity: 0; /*实先规定文字的状态是不显示的*/ animation: fade-in 4s ease 0s 1; /*调用名称为fade-in的动画,全程动画显示时间4S,进入方式为ease,延时0S进入,播放次数1次*/ -webkit-animation: fade-in 4s ease 0s 1; -moz-animation: fade-in 4s ease 0s 1; -o-animation: fade-in 4s ease 0s 1; -ms-animation: fade-in 4s ease 0s 1; /*规定动画的最后状态为结束状态*/ animation-fill-mode:forwards; -webkit-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; -ms-animation-fill-mode: forwards; -moz-animation-fill-mode: forwards; }.second-words{ opacity: 0; animation: fade-in 4s ease 2s 1; -webkit-animation: fade-in 4s ease 2s 1; -moz-animation: fade-in 4s ease 2s 1; -o-animation: fade-in 4s ease 2s 1; -ms-animation: fade-in 4s ease 2s 1; /*规定动画的最后状态为结束状态*/ animation-fill-mode:forwards; -webkit-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; -ms-animation-fill-mode: forwards; -moz-animation-fill-mode: forwards; }.third-words{ opacity: 0; animation: fade-in 4s ease 4s 1; -webkit-animation: fade-in 4s ease 4s 1; -moz-animation: fade-in 4s ease 4s 1; -o-animation: fade-in 4s ease 4s 1; -ms-animation: fade-in 4s ease 4s 1; /*规定动画的最后状态为结束状态*/ animation-fill-mode:forwards; -webkit-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; -ms-animation-fill-mode: forwards; -moz-animation-fill-mode: forwards; }.four-words{ opacity: 0; animation: fade-in 4s ease 6s 1; -webkit-animation: fade-in 4s ease 6s 1; -moz-animation: fade-in 4s ease 6s 1; -o-animation: fade-in 4s ease 6s 1; -ms-animation: fade-in 4s ease 6s 1; /*规定动画的最后状态为结束状态*/ animation-fill-mode:forwards; -webkit-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; -ms-animation-fill-mode: forwards; -moz-animation-fill-mode: forwards; }.five-words{ opacity: 0; animation: fade-in 4s ease 8s 1; -webkit-animation: fade-in 4s ease 8s 1; -moz-animation: fade-in 4s ease 8s 1; -o-animation: fade-in 4s ease 8s 1; -ms-animation: fade-in 4s ease 8s 1; /*规定动画的最后状态为结束状态*/ animation-fill-mode:forwards; -webkit-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; -ms-animation-fill-mode: forwards; -moz-animation-fill-mode: forwards; }.six-words{ opacity: 0; animation: fade-in 4s ease 10s 1; -webkit-animation: fade-in 4s ease 10s 1; -moz-animation: fade-in 4s ease 10s 1; -o-animation: fade-in 4s ease 10s 1; -ms-animation: fade-in 4s ease 10s 1; /*规定动画的最后状态为结束状态*/ animation-fill-mode:forwards; -webkit-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; -ms-animation-fill-mode: forwards; -moz-animation-fill-mode: forwards; }
上記の手順をコメントに明確に書きました。興味がある場合は、私が書いたコメントを読んでください。比較的単純で難しくないと思いますが、追加に注意する必要があります。ブラウザのプレフィックス、そうでなければ理解できます~~~~

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック









この記事では、HTML&lt; Progress&gt;について説明します。要素、その目的、スタイリング、および&lt; meter&gt;との違い要素。主な焦点は、&lt; Progress&gt;を使用することです。タスクの完了と&lt; Meter&gt; statiの場合

この記事では、HTML&lt; Datalist&GT;について説明します。オートコンプリートの提案を提供し、ユーザーエクスペリエンスの改善、エラーの削減によりフォームを強化する要素。

この記事では、html&lt; meter&gt;について説明します。要素は、範囲内でスカラーまたは分数値を表示するために使用され、Web開発におけるその一般的なアプリケーション。それは差別化&lt; Meter&gt; &lt; Progress&gt;およびex

この記事では、モバイルデバイスのレスポンシブWebデザインに不可欠なViewportメタタグについて説明します。適切な使用により、最適なコンテンツのスケーリングとユーザーの相互作用が保証され、誤用が設計とアクセシビリティの問題につながる可能性があることを説明しています。

HTMLは、簡単に学習しやすく、結果をすばやく見ることができるため、初心者に適しています。 1)HTMLの学習曲線はスムーズで簡単に開始できます。 2)基本タグをマスターして、Webページの作成を開始します。 3)柔軟性が高く、CSSおよびJavaScriptと組み合わせて使用できます。 4)豊富な学習リソースと最新のツールは、学習プロセスをサポートしています。

この記事では、&lt; iframe&gt;外部コンテンツをWebページ、その一般的な用途、セキュリティリスク、およびオブジェクトタグやAPIなどの代替案に埋め込む際のタグの目的。

HTMLはWeb構造を定義し、CSSはスタイルとレイアウトを担当し、JavaScriptは動的な相互作用を提供します。 3人はWeb開発で職務を遂行し、共同でカラフルなWebサイトを構築します。

Anexampleapalofastartingtaginhtmlis、それはaperginsaparagraph.startingtagsaresentionentientiontheyinitiateelements、definetheirtypes、およびarecrucialforurturingwebpagesandcontingthomedomを構築します。
