成果を達成する実装コード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 のどちらを使用すべきか
1. Windows 版の Docker をインストールしたら、Docker クイックスタート ター...
この記事では、MySQL 8.0.15 winx64のインストールと設定方法を参考までに紹介します。...
この記事は、参考のためにMySQL 8.0.19のインストールと設定のグラフィックチュートリアルを記...
会社が現在使用しているソリューションを確認するためにバックエンドにログインしました。使用される FT...
Java開発キットjdkをダウンロードするJDK のダウンロード アドレスはhttp://www.o...
仕事を探しています!!!事前準備:まず、このアニメーションは、以前のローディングアニメーションとクー...
1. 依存関係をダウンロードするnpm インストール @antv/データセットnpm インストール ...
目次1. MacへのDockerのインストール2. Win 10 システムでの Docker のイン...
本体の幅をウィンドウの幅に設定します(次のスクリプトで制御されます) $("body&qu...
1. トップレベルの使用法1. cnpmをインストールする npm i -g cnpm --regi...
モチベーション学習の必要性から、海外のサーバーメーカー(どこのメーカーかは言いません)のVPSサービ...
この記事では、WeChatアプレットのウォーターフォールフローページングスクロールロードを実装するた...
最近、機能拡張の要件を受け取りました。ただし、新しい要件で参照されているデータインターフェイスは、X...
MySQLリモート接続の問題に関しては、会社で働いているときに誰かのコンピュータに保存されているMy...
JS で CSS 変数を使用する方法:export キーワードを使用して、js オブジェクトを le...