日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

head first html with css with xhtml 学习小笔记

發布時間:2025/7/14 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 head first html with css with xhtml 学习小笔记 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.html文件第一行要放Document Type, 以防瀏覽器使用Quirks模式來解析頁面

<!DOCTYPE?html?PUBLIC?"-//W3C//DTD?XHTML?1.0?Transitional//EN"
?????"http://www.w3.org/TR/xhtml1/DTD/xhtml1/DTD/xhtml1-transitional.dtd"
>

<!DOCTYPE?html?PUBLIC?"-//W3C//DTD?XHTML?1.0?Strict//EN"
?????"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
>

?

?

2. <html>一定要有<head>和<body>。<head>里面一定要有<meta>(指的是指定此html編碼的meta,如<meta http-equiv=”Content-Type” content=”text/html; charset=utf”>,且一定要作為<head>的第一個子元素,保證瀏覽器成功解析title的內容?)和<title>。

?

3.<p>里不能放block element,<blockquote>里一定要放block element。

?

4.<body>里只能放block element。

?

5.line-Height的用法

#container
{
????line-height:?1px;????/*行寬1px*/
????line-height:?1em;????/*container及其decendents的行寬為container的font-size的1倍*/
????line-height:?1;??????/*container的行寬為container的font-size的1倍
?????????????????????????decendents的行寬為各自的font-size的1倍*/
}?

?

6.<div>是block element,<span>是inline element。它們都是容器。

?

7.元素在xhtml里要寫作閉合的。<br>要寫成<br />或<br/>,如果“br”和“/”之間沒加空格,老的瀏覽器可能不能識別。


8.兩個block element上下接觸的時候,上element的margin-bottom和下element的margin-top的最大值為兩個element之間的距離。如果a元素在b元素上方,a元素的margin-bottom為13px,b元素的element的margin-top為5px,最大值為13px,所以a元素和b元素之間的距離為13px;


9.Floated elements are taken out of the normal flow and placed to the left or right.(浮動元素會從流中移除,放到左邊或右邊。)

?

10.Floated elements sit on top of block elements and don't affect their flow. However, the inline content respects the boundaries of a foated element and flows around it.(浮動元素如果出現在block element上方,是不會影響block element的流的,即原來該怎么樣,還是怎么樣。然而,inline element會尊重浮動元素的邊界,即不會進入浮動元素范圍內)

?

11.The clear property is used to specify that no foated elements can be on the left or right (or both) of a block element. A block element with clear set will move down until it is free of the block element on its side.(clear屬性可以讓浮動元素不會出現在block元素的左邊、右邊(或兩者兼有)。)

?

12. A foated element must have a specifc width set to a value other than auto.?(浮動元素必須指定寬度。)

?

13.If an absolutely positioned element is nested within another positioned element, then its position is relative to the containing element that is positioned.(如果一個設置了position屬性的元素嵌套在另一個設置了position屬性的元素內,則它的position是相對于包含著它的元素的position。)

?

14.When using relative positioning, left, right, top, and bottom refer to the amount of offset from?the element’s position in the normal flow.(不像absolute和fixed,relative的元素仍然在流中,只是在元素顯示前,瀏覽器移動了它的位置)

轉載于:https://www.cnblogs.com/StephenHuang/archive/2010/11/12/1875541.html

總結

以上是生活随笔為你收集整理的head first html with css with xhtml 学习小笔记的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。