CSS分類:將帶有邊框的影象浮動於段落的右側?

Tags: 段落, 邊框, 影象,

CSS 程式碼均位於 HTML 的 head 部分,這樣做的目的是為了利於演示例子本身。在實際的開發中,使用 CSS 最好的方式是引用外部樣式表。
這裡介紹CSS分類:將帶有邊框的影象浮動於段落的右側

CSS分類:將帶有邊框的影象浮動於段落的右側

工具/原料

editplus;當然還有瀏覽器。

步驟/方法

在編輯器中輸入以下程式碼:





在下面的段落中,影象會浮動到右側,並且添加了點狀的邊框。我們還為影象添加了邊距,這樣就可以把文字推離影象:上和右外邊距是 0px,下外邊距是 15px,而影象左側的外邊距是 20px。




This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.



執行結果為:

CSS分類:將帶有邊框的影象浮動於段落的右側

注意事項

本文僅供參

段落, 邊框, 影象,
相關問題答案