成果を達成する実装コード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 のどちらを使用すべきか
SSH プラグインの使用による公開Publish Over SSH を使用する前に、SSH 秘密キー...
目次1. 複数ページの違い2. SPAとMPA 3. Vue Cli スキャフォールディング構成1....
導入Vue Router 、 Vue.jsの公式ルーティング マネージャーです。 Vue.jsのコア...
目次1. 基本的な文法2. 条件式によるフィルタリング3. 論理式によるフィルタリング4. あいまい...
以前、上司からログイン後にチェックマークを表示できるプログラムを作るように言われたのですが、Baid...
目次1. イベントの委任イベントバブリングイベントキャプチャイベントの泡立ちの昇華考える2. 深いコ...
この記事では、シンプルなカレンダー効果を実現するためのJSの具体的なコードを参考までに紹介します。具...
まず、provide/inject を使用する理由について説明しましょう。祖父コンポーネントと孫コン...
1. インデックスの利点と欠点利点: 高速検索、高速グループ化および並べ替えデメリット: ストレージ...
実験環境最小限にインストールされた CentOS 7.3 仮想マシン基本環境を構成する1. ngin...
概要クラウド プラットフォームのお客様のサーバーでは、業務量が拡大し続けるとディスク容量が不足する場...
mysql 5.6.35 winx64無料インストールバージョン構成チュートリアルwin10、具体的...
コードをコピーコードは次のとおりです。 <html> <ヘッド> <m...
Linux で MySQL-5.7.19 バージョンをインストールするための最初のチュートリアル。す...
Linux のコマンドラインで他のユーザーにメッセージを送信するのは簡単です。これを行うコマンドは多...