CSS3 を使用してコードケースを共有してアニメーション効果の読み込みを実装する
CSS3 を使用してアニメーション効果の読み込みを実装するコードケース共有
コードは次のとおりです:
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>css3 loading等待加载代码 - 何问起</title> <style> @keyframes move { from { transform: translate(0,50%); } to { transform: translate(0,850%); } } * { margin: 0; padding: 0; } body { min-width: 325px; height: 100vh; display: flex; flex-wrap: wrap; justify-content: space-around; align-items: center; align-content: flex-start; background: #2a2a2a; } figure { margin: 30px; width: 250px; height: 250px; border-radius: 50%; position: relative; background: #1c1c1c; } section { width: 10%; height: 100%; position: absolute; left: 45%; } section:nth-child(2) { transform: rotate(22.5deg); } section:nth-child(3) { transform: rotate(45deg); } section:nth-child(4) { transform: rotate(67.5deg); } section:nth-child(5) { transform: rotate(90deg); } section:nth-child(6) { transform: rotate(112.5deg); } section:nth-child(7) { transform: rotate(135deg); } section:nth-child(8) { transform: rotate(157.5deg); } figure p { height: 10%; border-radius: 50%; background: dodgerblue; animation: move 1s ease-in-out infinite alternate; } figure:nth-child(1) > section:nth-child(1) > p { animation-delay: -0.1875s; } figure:nth-child(1) > section:nth-child(2) > p { animation-delay: -0.175s; } figure:nth-child(1) > section:nth-child(3) > p { animation-delay: -0.1625s; } figure:nth-child(1) > section:nth-child(4) > p { animation-delay: -0.15s; } figure:nth-child(1) > section:nth-child(5) > p { animation-delay: -0.9375s; } figure:nth-child(1) > section:nth-child(6) > p { animation-delay: -0.925s; } figure:nth-child(1) > section:nth-child(7) > p { animation-delay: -0.9125s; } figure:nth-child(1) > section:nth-child(8) > p { animation-delay: -0.9s; } figure:nth-child(2) > section:nth-child(1) > p { animation-delay: -0.875s; } figure:nth-child(2) > section:nth-child(2) > p { animation-delay: -0.75s; } figure:nth-child(2) > section:nth-child(3) > p { animation-delay: -0.625s; } figure:nth-child(2) > section:nth-child(4) > p { animation-delay: -0.5s; } figure:nth-child(2) > section:nth-child(5) > p { animation-delay: -0.375s; } figure:nth-child(2) > section:nth-child(6) > p { animation-delay: -0.25s; } figure:nth-child(2) > section:nth-child(7) > p { animation-delay: -0.125s; } figure:nth-child(3) > section:nth-child(1) > p { animation-delay: -0.5s; } figure:nth-child(3) > section:nth-child(3) > p { animation-delay: -0.5s; } figure:nth-child(3) > section:nth-child(5) > p { animation-delay: -0.5s; } figure:nth-child(3) > section:nth-child(7) > p { animation-delay: -0.5s; } figure:nth-child(4) > section:nth-child(1) > p { animation-delay: -0.35s; } figure:nth-child(4) > section:nth-child(2) > p { animation-delay: -0.3s; } figure:nth-child(4) > section:nth-child(3) > p { animation-delay: -0.25s; } figure:nth-child(4) > section:nth-child(4) > p { animation-delay: -0.2s; } figure:nth-child(4) > section:nth-child(5) > p { animation-delay: -0.15s; } figure:nth-child(4) > section:nth-child(6) > p { animation-delay: -0.1s; } figure:nth-child(4) > section:nth-child(7) > p { animation-delay: -0.05s; } </style> <script src="js/prefixfree.min.js"></script></head><body> <figure> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> </figure> <figure> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> </figure> <figure> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> </figure> <figure> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> <section><p></p></section> </figure> <p style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';"> <p>适用浏览器:360、FireFox、Chrome、Opera、傲游、搜狗、世界之窗. 不支持Safari、IE8及以下浏览器。</p> <p>来源:<a href="http://hovertree.com/" target="_blank">何问起</a></p> </p></body></html>
以上がCSS3 を使用してコードケースを共有してアニメーション効果の読み込みを実装するの詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

ホット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)

ホットトピック









純粋な CSS3 で波の効果を実現するにはどうすればよいですか?この記事ではSVGとCSSアニメーションを使って波のエフェクトを作成する方法をご紹介しますので、お役に立てれば幸いです。

この記事では、頻繁に登場する様々な奇妙な形のボタンをCSSを使って簡単に実現する方法を紹介しますので、ぜひ参考にしてください。

2 つの方法: 1. display 属性を使用して、要素に「display:none;」スタイルを追加するだけです。 2. Position 属性と top 属性を使用して、要素の絶対位置を設定し、要素を非表示にします。要素に「position:absolute;top:-9999px;」スタイルを追加するだけです。

CSS では、border-image 属性を使用してレースの境界線を実現できます。 border-image 属性では、画像を使用して境界線を作成できます。つまり、境界線に背景画像を追加できます。背景画像をレース スタイルとして指定するだけで済みます。構文「border-image: url (画像パス) は、内側への画像境界線の幅。開始を繰り返すかどうか;"。

テキストカルーセルと画像カルーセルを作成するにはどうすればよいですか?皆さんが最初に考えるのはjsを使うかどうかですが、実はテキストカルーセルや画像カルーセルも純粋なCSSでも実現できますので実装方法を見ていきましょう。

実装方法: 1. ":active" セレクターを使用して、画像上のマウス クリックの状態を選択します; 2. 変換属性とscale() 関数を使用して、画像の拡大効果を実現します。構文 "img:active {transform : スケール(x 軸倍率、y 軸倍率);}"。

CSS3 では、「animation-timing-function」属性を使用してアニメーションの回転速度を設定できます。この属性は、アニメーションがサイクルを完了する方法を指定し、アニメーションの速度曲線を設定するために使用されます。構文は「element {アニメーションタイミング関数: 速度属性値;}"。

フロントエンド開発では、Web ページとの対話中にユーザーがデータがロードされるまで待機する必要があるシナリオがよくありますが、このとき、通常はユーザーに待機を促すためにロード効果が表示されます。 Vue フレームワークでは、グローバルローディングエフェクトの実装は難しくありませんので、その実装方法を紹介します。ステップ 1: Vue プラグインを作成する すべての Vue インスタンスで参照できる、loading という名前の Vue プラグインを作成できます。プラグインでは、次の 2 つのメソッドを実装する必要があります。
