成果を達成する実装コードhtml<div class="wrap"> <div class="progress-radial progress-25"> <div class="overlay">25%</div> </div> <div class="progress-radial progress-50"> <div class="overlay">50%</div> </div> <div class="progress-radial progress-75"> <div class="overlay">75%</div> </div> <div class="progress-radial progress-90"> <div class="overlay">90%</div> </div> </div> CSurl をインポートします(https://fonts.googleapis.com/css?family=Noto+Sans); 体 { パディング: 30px 0; 背景色: #2f3439; フォントファミリ: "Noto Sans"、サンセリフ; } 。包む { 幅: 600ピクセル; マージン: 0 自動; } /* ------------------------------------- * バーコンテナ * ------------------------------------- */ .progress-radial { フロート: 左; 右マージン: 30px; 位置: 相対的; 幅: 100ピクセル; 高さ: 100px; 境界線の半径: 50%; 境界線: 2px 実線 #2f3439; 背景色: トマト; } /* ------------------------------------- * テキスト付きの中央円(オプション) * ------------------------------------- */ .progress-radial .overlay { 位置: 絶対; 幅: 60ピクセル; 高さ: 60px; 背景色: #fffde8; 境界線の半径: 50%; 左マージン: 20px; 上マージン: 20px; テキスト配置: 中央; 行の高さ: 60px; フォントサイズ: 16px; } /* ------------------------------------- * progress-% クラスのミックスイン * ------------------------------------- */ .progress-0 { 背景画像: linear-gradient(90deg, #2f3439 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(90deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-5 { 背景画像: linear-gradient(90deg, #2f3439 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(108deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-10 { 背景画像: linear-gradient(90deg, #2f3439 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(126deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-15 { 背景画像: linear-gradient(90deg, #2f3439 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(144deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-20 { 背景画像: linear-gradient(90deg, #2f3439 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(162deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-25 { 背景画像: linear-gradient(90deg, #2f3439 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(180deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-30 { 背景画像: linear-gradient(90deg, #2f3439 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(198deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-35 { 背景画像: linear-gradient(90deg, #2f3439 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(216deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-40 { 背景画像: linear-gradient(90deg, #2f3439 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(234deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-45 { 背景画像: linear-gradient(90deg, #2f3439 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(252deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-50 { 背景画像: linear-gradient(-90deg, #ff6347 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(270deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-55 { 背景画像: linear-gradient(-72deg, #ff6347 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(270deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-60 { 背景画像: linear-gradient(-54deg, #ff6347 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(270deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-65 { 背景画像: linear-gradient(-36deg, #ff6347 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(270deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-70 { 背景画像: linear-gradient(-18deg, #ff6347 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(270deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-75 { 背景画像: linear-gradient(0deg, #ff6347 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(270deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-80 { 背景画像: linear-gradient(18deg, #ff6347 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(270deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-85 { 背景画像: linear-gradient(36deg, #ff6347 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(270deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-90 { 背景画像: linear-gradient(54deg, #ff6347 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(270deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-95 { 背景画像: linear-gradient(72deg, #ff6347 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(270deg, #ff6347 50%, #2f3439 50%, #2f3439); } .progress-100 { 背景画像: linear-gradient(90deg, #ff6347 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0)), linear-gradient(270deg, #ff6347 50%, #2f3439 50%, #2f3439); } 以上がCSSで実装した円形プログレスバーの詳細です。CSSで実装した円形プログレスバーの詳細については、123WORDPRESS.COMの他の関連記事にも注目してください! |
<<: HTML でシンプルな ListViews 効果を実装するためのサンプル コード
>>: モバイル Web WAP には Bootstrap と jQuery Mobile のどちらを使用すべきか
エンコーディングの理由により、Linux サーバーに中国語のファイルやディレクトリをアップロードまた...
前面に書かれた今日のインターネット分野では、Nginx は最も広く使用されているプロキシ サーバーの...
まず、フォームを送信するいくつかの方法を見てみましょう。 1. <!--一般的な送信ボタン--...
(I) 方法 1: 事前にスクリプト タグ内に直接定義します。この HTML ファイルにのみ適用され...
この記事では、MySQL 8.0.13の手動インストールチュートリアルを参考までに紹介します。具体的...
目次vue2のキャッシュ機能Vue キャッシュ関数の変換最適化要約するvue2のキャッシュ機能vue...
1いくつかの一般的な文字セットMySQL で最も一般的な文字セットには、ASCII 文字セット、ラテ...
適切な設定を行うことで、Linux ユーザーにパスワードを定期的に変更させることができます。パスワー...
数日前、Codepen で @Kyle Wetton が書いた、CSS ブレンディング モードと S...
1. Vue - 最初の vue-cli プログラムVueの開発はNodeJSに基づいています。実際...
まずは投稿する前に! 「I Want to Study on My Own!」に改めて感謝します。た...
1つ以上の機能をロードする <テンプレート> <div id="map&...
最終的な解決策は最後の写真にありますリモート データベース ( Linux システム) に接続したと...
<br />ネットワーク設計の分野では、アイトラッキングに関する研究が非常に盛んに行われ...
1. コマンドの紹介date コマンドは、現在の時刻または指定された時刻を指定された形式で表示するた...