HTMLを使用したフレーム-仕組み
Webサイト上のメディアをより魅力的にするために、HTMLコードを使用してフレームを描画できます。 この実用的なヒントでは、これがどのように機能するか、フレームを定義するときにカスケードスタイルシート(CSS)が提供する利点を示します。
HTMLコーディング-画像やその他のメディアの周囲にフレームを描画します
デフォルトでは、各画像には1ピクセル幅のフレームがあります。 ただし、これは画像がハイパーリンクとして使用されている場合にのみ表示されます。 「境界」属性を使用すると、フレームの厚さを個別に定義できます。
- HTMLでは、10ピクセルの黒いフレームのコードは次のようになります。
- このフレームは、オブジェクトの4つの側面すべてに適用されます。
- または、Gimpなどの画像編集プログラムを使用して、画像の周囲にフレームを描画できます。
- ただし、これにより画像が大きくなり、ウェブサイトにアクセスしたユーザーが画像をダウンロードするのに時間がかかることに注意してください。
CSSを使用してHTMLドキュメントでフレームを定義する
カスケードスタイルシートを使用して、フレーム(テキストの周囲のボックスなど)をさらに正確に定義できます。
- 別の実用的なヒントでは、CSSファイルをWebサイトに統合する方法を説明しています。
- このCSSドキュメントでは、4つのページすべてに対してフレームの色と太さを別々に設定できます。
- border-bottom:#999-下部フレームの色を設定します。 ここでは、「border-top」、「border-right」または「border-left」も使用できます。
- border-width:0 0 thin thin-線の太さを指定します。 これは時計回りに行われます。 ここでは、上下に細い線が定義されているのに、上下に線が見えないことを意味します。
- ボーダースタイル:なしなし溝溝-画像またはボックスの装飾フレームを定義します。 「溝」スタイルは3D効果を作成します。
ホームページは、ネット上の存在から自然に生きています。 次の記事では、Googleランキングを改善するための最高のヒントをお読みください。