php課程的第一天

來源:互聯網
上載者:User

標籤:php   網頁   課程   心情   

   今天是php課程的第一天,懷著激動懵逼的複雜心情,寫下今天所學的內容。

   首先是三個名詞。即http,HyperText Transfor Protoca超文字傳輸通訊協定 (HTTP);http通常發生在TCP/IP串連之上,預設連接埠80。URL,uniform resorce locaor,統一資源定位器(網址)。html,Hypertext Marked Language,超文字標記語言 (HTML)。css,Cascading style sheets,層疊樣式表。                      然後是開始寫最基礎最簡單的代碼。首先是基本的格式,如下


<html>

<!--頭標籤-->

<head>

<!--  -->

<meta charset="utf8">

<!--標題標籤-->

<title></title>

</head>

<!--體標籤-->

<body>

</body>

</html>

<!--  -->是對內容的注釋,知識內容寫在兩個--與另外兩個的中間。<meta charset=>是對該代碼所用的進位與文字轉化指令,兩個title之間是網頁的標題,兩個body之間是具體的內容,兩個head之間則是這些內容的格式。注意<head><heml><body>要兩個。

   然後是基本的一些操作。

   我在所寫的網頁上作出兩個帶顏色的正方形,並給出長寬,如下。


html>

<!--頭標籤-->

<head>

<!--  -->

<meta charset="utf8">

<!--標題標籤-->

<title>第一個</title>

<style>

#a{width: 200px;height: 200px;background-color: #FF0000;}

#b{width: 200px;height: 200px;background-color: #00FF00;}

</style>

</head>

<!--體標籤-->

<body>

<div id="a">老劉喝阿薩姆奶茶</div>

<div id="b"></div>

</body>

</html>


   在代表顏色的代碼後加入float:both/right/left可以調節兩個圖形的上下左右順序。

   還可以用<div class="clean"></div>來調節。(註:id=#,class=.)如下。

<!--頭標籤-->

<head>

<!--  -->

<meta charset="utf8">

<!--標題標籤-->

<title>第一個</title>

<style>

#a{width: 200px;height: 200px;background-color: #FF0000;float:left;}

.clean{clear: both;}

    #b{width: 200px;height: 200px;background-color: #ca952c;float:left;}

</style>

</head>

<!--體標籤-->

<body>

<div id="a">老劉喝阿薩姆奶茶</div>

<div class="clean"></div>

<div id="b"></div>

</body>

</html>

   如欲將多個正方形由橫排轉為有上有下的,則需如下操作。本人做了四個正方形。

<html>

<!--頭標籤-->

<head>

<!--  -->

<meta charset="utf8">

<!--標題標籤-->

<title>第一個</title>

<style>

div{width:200px;

height:200px;}

#a{background-color: #FF0000;float:left;}


    #b{background-color: #ca952c;float:left;}

#c{background-color: #FF0000;float:left;}

    #d{background-color: #FF0000;float:left;}

.clean{width:0px;height:0px;clear:left; }

</style>

</head>

<!--體標籤-->

<body>

<div id="a">老劉喝阿薩姆奶茶</div>

<div id="b"></div>

<div class="clean"></div>

<div id="c"></div>

<div id="d"></div>

</body>

</html>

  

以上就是我作為小白新手學習php第一天的收穫,請大神們指教!



php課程的第一天

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.