」として定義します。 2. 回転するアニメーション属性を通じてさまざまな効果を持つ境界線を設定します。コードは「アニメーション: 円 2s 無限リニア; @keyframes 円 {0% {transform:rotate(0deg);}」です。"/> 」として定義します。 2. 回転するアニメーション属性を通じてさまざまな効果を持つ境界線を設定します。コードは「アニメーション: 円 2s 無限リニア; @keyframes 円 {0% {transform:rotate(0deg);}」です。">

ホームページ  >  記事  >  ウェブフロントエンド  >  CSS3アニメーションで円を回転させる方法

CSS3アニメーションで円を回転させる方法

藏色散人
藏色散人オリジナル
2023-02-01 10:54:302370ブラウズ

CSS3 アニメーションで円を回転させる方法: 1. 新しい HTML サンプル ファイルを作成し、div を "188263384bc4c0decce28aa87ab1847116b28748ea4df4d9c2150843fecfba68" として定義します。 2. アニメーションを通じて属性 さまざまな効果の境界線を設定し、回転を実行します。 コードは、「animation: Circle 2s Infinite Linear; @keyframes Circle {0% {transform:rotate(0deg);}」です。

CSS3アニメーションで円を回転させる方法

このチュートリアルの動作環境: Windows 10 システム、CSS3 バージョン、DELL G3 コンピューター

円を回転させる方法css3アニメーション?

#CSS3 リング回転エフェクト

#1. CSS3 リング回転エフェクト 1原則: さまざまな効果を持つ境界線を設定し、回転させます

#

<div class="demo"></div><style>
    .demo {
        width: 250px;
        height: 250px;
        border: 50px solid red;
        border-left-color: blue;
        border-right-color: yellow;
        border-top-color: #04f105;
        margin: 100px;
        border-radius: 50%;
        animation: circle 2s infinite linear;
    }
    @keyframes circle {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(-360deg);
        }
    }</style>

## 2. CSS 3 リング効果 2

#原則: 多層の境界線を使用して溝を下げ、回転を実行します#

<div class="demoout">
    <div class="demo"></div></div><style>
    body {
        background: black;
    }

    .demo {
        width: 250px;
        height: 250px;
        border: 3px solid white;
        border-left-color: blue;
        border-right-color: yellow;
        margin: 25px;
        border-radius: 50%;
        animation: circle 4s infinite ease;
        background: white;
    }

    .demoout {
        width: 300px;
        height: 300px;
        border: 3px solid white;
        border-top-color: green;
        border-bottom-color: red;
        margin: 100px;
        border-radius: 50%;
        animation: circle 4s infinite linear;
        background: white;
    }

    @-webkit-keyframes circle {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(-360deg);
        }
    }</style>

効果は次のとおりです:

推奨される学習: 「

css ビデオ チュートリアル

以上がCSS3アニメーションで円を回転させる方法の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。