Bootstrap コンポーネントのパネル コンポーネントの簡単な分析 コンポーネント_JavaScript スキル
Bootstrap, from Twitter, is currently the most popular front-end framework. Bootstrap is based on HTML, CSS, and JAVASCRIPT. It is simple and flexible, making web development faster.
The main function of the panel component is to handle some functions that cannot be completed by other components. It has different source codes in different versions:
LESS: panels.less
SASS:_panels.scss
The basic panel is very simple. It is a div container that uses the .panel class style to generate a text display block with a border. Since the panel does not control the theme color, a theme that controls the color is added based on the .panel. Class .panel-default, add a div.panel-body inside to place the main content of the panel
.panel mainly has certain settings for borders, spacing, rounded corners, and left and right:
.panel { margin-bottom: 20px; background-color: #fff; border: 1px solid transparent; border-radius: 4px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); box-shadow: 0 1px 1px rgba(0, 0, 0, .05); } .panel-body { padding: 15px; }
Usage of basic panel:
<h1>基础面板</h1> <div class="panel panel-default"> <div class="panel-body">这是一个基础面板,带默认主题样式风格</div> </div>
Panel with header and tail
In order to enrich the functions of the panel, bootstrap specially adds the effects of panel header and panel tail to the panel,
.panel-heading: Set the panel header style
.panel-footer: Set the panel footer style
.panel-headingh and .panel-footer only set the spacing and rounded corners
.panel-heading { padding: 10px 15px; border-bottom: 1px solid transparent; border-top-left-radius: 3px; border-top-right-radius: 3px; } .panel-heading > .dropdown .dropdown-toggle { color: inherit; } .panel-title { margin-top: 0; margin-bottom: 0; font-size: 16px; color: inherit; } .panel-title > a { color: inherit; } .panel-footer { padding: 10px 15px; background-color: #f5f5f5; border-top: 1px solid #ddd; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; }
Example:
<h1>带有头和尾的面板</h1> <div class="panel panel-default"> <div class="panel-heading">这里是面板头部标题</div> <div class="panel-body">这里是面板内容部分这里是面板内容部分这里是面板内容部分这里是面板内容部分这里是面板内容部分这里是面板内容部分这里是面板内容部分</div> <div class="panel-footer">这里是面板尾部部分</div> </div>
Color Panel
Since the .panel style does not set the theme color, the panel component in the bootstrap framework handles the default theme (.panel-default) style, and also includes the following theme styles:
.panel-primary: focus blue
.panel-success: success green
.panel-info: information blue (light)
.panel-warning: warning yellow
.panel-danger:danger red
These styles only change the background color, text, and border color of the panel
The method of use is very simple, just add the required theme class name to the .panel class name
Example:
<h1>彩色面板</h1> <div class="panel panel-default"> <div class="panel-heading">白头吟</div> <div class="panel-body">皑如山上雪,皎若云间月。 闻君有两意,故来相决绝。 今日斗酒会,明旦沟水头。 躞蹀御沟上,沟水东西流。 凄凄复凄凄,嫁娶不须啼。 愿得一人心,白首不相离。 竹竿何袅袅,鱼尾何簁簁! 男儿重意气,何用钱刀为!</div> <div class="panel-footer">作者:卓文君</div> </div> <div class="panel panel-primary"> <div class="panel-heading">无题</div> <div class="panel-body">昨夜星辰昨夜风,画楼西畔桂堂东。 身无彩凤双飞翼,心有灵犀一点通。 隔座送钩春酒暖,分曹射覆蜡灯红。 嗟余听鼓应官去,走马兰台类转蓬。</div> <div class="panel-footer">作者:李商隐</div> </div> <div class="panel panel-success"> <div class="panel-heading">青玉案·元夕</div> <div class="panel-body">东风夜放花千树,更吹落,星如雨。宝马雕车香满路。凤箫声动,玉壶光转,一夜鱼龙舞。 蛾儿雪柳黄金缕,笑语盈盈暗香去。众里寻他千百度,蓦然回首,那人却在,灯火阑珊处。</div> <div class="panel-footer">作者: 辛弃疾</div> </div> <div class="panel panel-info"> <div class="panel-heading">离思</div> <div class="panel-body">曾经沧海难为水,除却巫山不是云。 取次花丛懒回顾,半缘修道半缘君。</div> <div class="panel-footer">作者: 元稹</div> </div> <div class="panel panel-danger"> <div class="panel-heading">画梅</div> <div class="panel-body">微雪初消月半池,篱边遥见两三枝。 清香传得天心在,未话寻常草木知。</div> <div class="panel-footer">作者: 方孝孺</div> </div> <div class="panel panel-warning"> <div class="panel-heading">菊花</div> <div class="panel-body">秋丛绕舍似陶家,遍绕篱边日渐斜。 不是花中偏爱菊,此花开尽更无花。</div> <div class="panel-footer">作者: 元稹</div> </div>
The effect is as follows:
Nested table in panel
Generally, the panel can be understood as an area. When using the panel, the required content will be placed in the .panel-body container. The content inside may be pictures, tables, lists, etc.; let’s take a look at the panel. The effect of nested tables and list groups in , here is an example of nested tables:
<h1>面板中嵌套表格</h1> <div class="panel panel-default"> <div class="panel-heading">描写花的诗句</div> <div class="panel-body"> <p>诗人对菊花由衷喜爱:开得正旺的菊花一簇簇、一丛丛,遍布屋舍四周,他沿着竹篱,忘情地欣赏这些亲手栽种的秋菊,不觉日已西斜。</p> <table class="table table-bordered"> <thead> <tr> <th>不是花中偏爱菊,此花开尽更无花《菊花》</th> <th>愿得一人心,白首不相离《白头吟》</th> <th>床前明月光,疑是地上霜《静夜思》</th> </tr> </thead> <tbody> <tr> <td>先天下之忧而忧,后天下之乐而乐《岳阳楼记》</td> <td>我欲与君相知,长命无绝衰《上邪》</td> <td>人面不知何处去,桃花依旧笑春风《题都城南庄》</td> </tr> </tbody> </table> </div> <div class="panel-footer">这首诗取陶诗的意境,且也以淡雅朴素的语言吟咏,便不似陶公全用意象,蕴藉之至;而是在描绘具象之后,以自述的方式道出爱菊之由而又不一语说尽,留下了想象空间让人们去回味咀嚼,这就增强了它的艺术感染力。因而历来被人们所喜爱</div> </div>
In actual application, there may be no need for any spacing between the table and the edge of the panel, but the .panel-body sets a padding value of 15px. In order to achieve this effect, the table can be extracted to Outside panel-body:
For example:
<div class="panel panel-default"> <div class="panel-heading">描写花的诗句</div> <div class="panel-body"> <p>诗人对菊花由衷喜爱:开得正旺的菊花一簇簇、一丛丛,遍布屋舍四周,他沿着竹篱,忘情地欣赏这些亲手栽种的秋菊,不觉日已西斜。</p> </div> <table class="table table-bordered"> <thead> <tr> <th>《岳阳楼记》</th> <th>《上邪》</th> <th>《题都城南庄》</th> </tr> </thead> <tbody> <tr> <td>先天下之忧而忧,后天下之乐而乐</td> <td>我欲与君相知,长命无绝衰</td> <td>人面不知何处去,桃花依旧笑春风</td> </tr> </tbody> </table> <div class="panel-footer">这首诗取陶诗的意境,且也以淡雅朴素的语言吟咏,便不似陶公全用意象,蕴藉之至;而是在描绘具象之后,以自述的方式道出爱菊之由而又不一语说尽,留下了想象空间让人们去回味咀嚼,这就增强了它的艺术感染力。因而历来被人们所喜爱</div> </div>
Nested list group in panel
Example:
<h1>面板中嵌套列表组</h1> <div class="panel panel-default"> <div class="panel-heading">描写花的诗句</div> <div class="panel-body"> <p>面板嵌套列表组</p> <ul class="list-group"> <li class="list-group-item">列表项1</li> <li class="list-group-item">列表项2</li> <li class="list-group-item">列表项3</li> <li class="list-group-item">列表项4</li> <li class="list-group-item">列表项5</li> </ul> </div> <div class="panel-footer">作者:李商隐</div> </div>
Panel nested list combinations are the same as nested tables. If you don’t need such spacing, you can extract the list group from the .panel-body
Example:
<h1>面板中嵌套列表组</h1> <div class="panel panel-default"> <div class="panel-heading">描写花的诗句</div> <div class="panel-body"> <p>面板嵌套列表组</p> </div> <ul class="list-group"> <li class="list-group-item">列表项1</li> <li class="list-group-item">列表项2</li> <li class="list-group-item">列表项3</li> <li class="list-group-item">列表项4</li> <li class="list-group-item">列表项5</li> </ul> <div class="panel-footer">作者:李商隐</div> </div>
効果は次のとおりです:
上記は編集者が紹介したBootstrapコンポーネントのパネルコンポーネントです。ご参考になれば幸いです。

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック











さまざまなJavaScriptエンジンは、各エンジンの実装原則と最適化戦略が異なるため、JavaScriptコードを解析および実行するときに異なる効果をもたらします。 1。語彙分析:ソースコードを語彙ユニットに変換します。 2。文法分析:抽象的な構文ツリーを生成します。 3。最適化とコンパイル:JITコンパイラを介してマシンコードを生成します。 4。実行:マシンコードを実行します。 V8エンジンはインスタントコンピレーションと非表示クラスを通じて最適化され、Spidermonkeyはタイプ推論システムを使用して、同じコードで異なるパフォーマンスパフォーマンスをもたらします。

Pythonは、スムーズな学習曲線と簡潔な構文を備えた初心者により適しています。 JavaScriptは、急な学習曲線と柔軟な構文を備えたフロントエンド開発に適しています。 1。Python構文は直感的で、データサイエンスやバックエンド開発に適しています。 2。JavaScriptは柔軟で、フロントエンドおよびサーバー側のプログラミングで広く使用されています。

JavaScriptは、現代のWeb開発のコア言語であり、その多様性と柔軟性に広く使用されています。 1)フロントエンド開発:DOM操作と最新のフレームワーク(React、Vue.JS、Angularなど)を通じて、動的なWebページとシングルページアプリケーションを構築します。 2)サーバー側の開発:node.jsは、非ブロッキングI/Oモデルを使用して、高い並行性とリアルタイムアプリケーションを処理します。 3)モバイルおよびデスクトップアプリケーション開発:クロスプラットフォーム開発は、反応および電子を通じて実現され、開発効率を向上させます。

この記事では、許可によって保護されたバックエンドとのフロントエンド統合を示し、next.jsを使用して機能的なedtech SaaSアプリケーションを構築します。 FrontEndはユーザーのアクセス許可を取得してUIの可視性を制御し、APIリクエストがロールベースに付着することを保証します

私はあなたの日常的な技術ツールを使用して機能的なマルチテナントSaaSアプリケーション(EDTECHアプリ)を作成しましたが、あなたは同じことをすることができます。 まず、マルチテナントSaaSアプリケーションとは何ですか? マルチテナントSaaSアプリケーションを使用すると、Singの複数の顧客にサービスを提供できます

C/CからJavaScriptへのシフトには、動的なタイピング、ゴミ収集、非同期プログラミングへの適応が必要です。 1)C/Cは、手動メモリ管理を必要とする静的に型付けられた言語であり、JavaScriptは動的に型付けされ、ごみ収集が自動的に処理されます。 2)C/Cはマシンコードにコンパイルする必要がありますが、JavaScriptは解釈言語です。 3)JavaScriptは、閉鎖、プロトタイプチェーン、約束などの概念を導入します。これにより、柔軟性と非同期プログラミング機能が向上します。

Web開発におけるJavaScriptの主な用途には、クライアントの相互作用、フォーム検証、非同期通信が含まれます。 1)DOM操作による動的なコンテンツの更新とユーザーインタラクション。 2)ユーザーエクスペリエンスを改善するためにデータを提出する前に、クライアントの検証が実行されます。 3)サーバーとのリフレッシュレス通信は、AJAXテクノロジーを通じて達成されます。

現実世界でのJavaScriptのアプリケーションには、フロントエンドとバックエンドの開発が含まれます。 1)DOM操作とイベント処理を含むTODOリストアプリケーションを構築して、フロントエンドアプリケーションを表示します。 2)node.jsを介してRestfulapiを構築し、バックエンドアプリケーションをデモンストレーションします。
