W3.CSS

W3.CSSホーム W3.CSSイントロ W3.CSSカラー W3.CSSコンテナ W3.CSSパネル W3.CSSボーダー W3.CSSカード W3.CSSのデフォルト W3.CSSフォント W3.CSS Google W3.CSSテキスト W3.CSSラウンド W3.CSSパディング W3.CSSマージン W3.CSSディスプレイ W3.CSSボタン W3.CSSノート W3.CSSの見積もり W3.CSSアラート W3.CSSテーブル W3.CSSリスト W3.CSS画像 W3.CSS入力 W3.CSSバッジ W3.CSSタグ W3.CSSアイコン W3.CSSレスポンシブ W3.CSSレイアウト W3.CSSアニメーション W3.CSS効果 W3.CSSバー W3.CSSドロップダウン W3.CSSアコーディオン W3.CSSナビゲーション W3.CSSサイドバー W3.CSSタブ W3.CSSページ付け W3.CSSプログレスバー W3.CSSスライドショー W3.CSSモーダル W3.CSSツールチップ W3.CSSグリッド W3.CSSコード W3.CSSフィルター W3.CSSトレンド W3.CSSケース W3.CSSマテリアル W3.CSS検証 W3.CSSバージョン W3.CSSモバイル

W3.CSSカラー

W3.CSSカラークラス W3.CSSカラー素材 W3.CSSカラーフラットUI W3.CSSカラーメトロUI W3.CSSカラーWin8 W3.CSSカラーiOS W3.CSSカラーファッション W3.CSSカラーライブラリ W3.CSSカラースキーム W3.CSSカラーテーマ W3.CSSカラージェネレーター

Web構築

Webイントロ Web HTML Web CSS Web JavaScript Webレイアウト Webバンド Webケータリング Webレストラン Webアーキテクト

W3.CSSの例 W3.CSSデモ W3.CSSテンプレート

参考文献

W3.CSSリファレンス W3.CSSダウンロード

W3.CSS画像


四捨五入:

オーロラ

丸:

森林

ボーダー:

山

文章:

自然
自然

丸みを帯びた画像

ノルウェー

w3-roundクラスは、画像に丸みを帯びた角を追加します

<img src="img_snowtops.jpg" class="w3-round" alt="Norway">

丸で囲んだ画像

ノルウェー

w3-circleクラスは、画像を円に成形します。

<img src="snowtops.jpg" class="w3-circle" alt="Alps">


ボーダー画像

ノルウェー

w3-borderクラスは、画像の周囲に境界線を追加します。

<img src="snowtops.jpg" class="w3-border w3-padding" alt="Alps">

カードとしての画像

<img>要素の周りにw3-card- *クラスのいずれかをラップして、カードとして表示します(影を追加します)。

ライト

人

サイモン

すべてのボスのボス

<div class="w3-card-4">
  <img src="img_avatar.png" alt="Person">
</div>

画像テキスト

Position the text in an image with the w3-display-classes:

ライト

Top Left

Top Right

Bottom Left

Bottom Right

Left

Right

Middle

Top Middle

Bottom Middle

Example

<div class="w3-display-container">
  <img src="img_lights.jpg" alt="Lights">
  <div class="w3-display-topleft w3-container">Top Left</div>
  <div class="w3-display-topright w3-container">Top Right</div>
  <div class="w3-display-bottomleft w3-container">Bottom Left</div>
  <div class="w3-display-bottomright w3-container">Bottom Right</div>
  <div class="w3-display-left w3-container">Left</div>
  <div class="w3-display-right w3-container">Right</div>
  <div class="w3-display-middle w3-large">Middle</div>
  <div class="w3-display-topmiddle w3-container">Top Middle</div>
  <div class="w3-display-bottommiddle w3-container">Bottom Middle</div>
</div>

Responsive Images

An image can be set to automatically resize itself to fit the size of its container.

If you want the image to scale down if it has to, but never scale up to be larger than its original size, use the w3-image class.

Example

<img src="img_lights.jpg" alt="Lights" class="w3-image">

If you want the image to scale both up and down on responsiveness, set the CSS width property to 100%:

Example

<img src="img_lights.jpg" alt="Lights" style="width:100%">

If you want to restrict a responsive image to a maximum size, use the max-width property:

Example

<img src="img_lights.jpg" alt="Lights" style="width:100%;max-width:400px">

Opacity

The w3-opacity classes make images transparent:

Normal

w3-opacity-min

w3-opacity

w3-opacity-max

Example

<img src="img_forest.jpg" alt="Forest" class="w3-opacity-min">
<img src="img_forest.jpg" alt="Forest" class="w3-opacity">
<img src="img_forest.jpg" alt="Forest" class="w3-opacity-max">

Grayscale

The w3-grayscale classes add a grayscale effect to an image:

Normal

w3-grayscale-min

w3-grayscale

w3-grayscale-max

Example

<img src="image.jpg" alt="Table" class="w3-grayscale-min">
<img src="image.jpg" alt="Table" class="w3-grayscale">
<img src="image.jpg" alt="Table" class="w3-grayscale-max">

Note: The w3-grayscale classes are not supported in IE 11 and earlier versions.


Sepia

The w3-sepia classes add a sepia effect to an image:

Normal

w3-sepia-min

w3-sepia

w3-sepia-max

Example

<img src="image.jpg" alt="Table" class="w3-sepia-min">
<img src="image.jpg" alt="Table" class="w3-sepia">
<img src="image.jpg" alt="Table" class="w3-sepia-max">

Note: The w3-sepia classes are not supported in IE 11 and earlier versions.


Hover Effects

You can also add special effects on hover/mouse-over.

ノルウェー

w3-hover-opacity

ノルウェー

w3-hover-grayscale

ノルウェー

w3-hover-sepia

Example

<img src="image.jpg" alt="Einstein" class="w3-hover-opacity">
<img src="image.jpg" alt="Einstein" class="w3-hover-grayscale">
<img src="image.jpg" alt="Einstein" class="w3-hover-sepia">

Opacity Off

Add transparency on hover:

ノルウェー

Remove transparency on hover:

ノルウェー

The w3-hover-opacity class adds transparency to the image on mouse-over, and the w3-hover-opacity-off class removes transparency on mouse-over.

Example

<img src="snowtops.jpg" class="w3-hover-opacity" alt="Alps">
<img src="snowtops.jpg" class="w3-opacity w3-hover-opacity-off" alt="Alps">

Constructing a Photo Album

In this example we use the W3.CSS Responsive Grid system to create a photo album that looks good on all devices. You will learn more about this later.

Summer 2015

5 Terre

Monterosso

Vernazza

Manarola

Corniglia

Riomaggiore


Example

<div class="w3-third">
  <div class="w3-card">
    <img src="img_monterosso.jpg" style="width:100%">
    <div class="w3-container">
      <h4>Monterosso</h4>
    </div>
  </div>
</div>