標籤:alt images 紅色 utf-8 背景 image 第五天 一般來說 ima
1 <head> 2 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> 3 <title>第五天</title><!--標題--> 4 <meta name="description" content="網頁描述" /> 5 <style type="text/css"> 6 p,font{ 7 8 color:red;background-color:#33ff00;text-indent:2em; 9 text-decoration:line-through;10 font-size:x-large;/*給p、font標籤文本設定顏色、背景顏色,首行縮排2em、刪除線*/ 11 border-style:double;12 border-color:red #ffff00 blue pink;13 list-style-type:none14 }15 ol{ 16 color:red;background-color:blue;/*設定文字顏色、背景顏色*/17 margin:30px;/*設定外邊距*/18 padding:30px;/*設定內邊距*/19 }20 21 ul{ 22 color:red;/*設定文本顏色為紅色*/23 list-style-type:none;/*去掉項目符號*/ 24 list-style-image:url(xiangpian/li03.jpg);/*項目符號用圖片代替*/25 26 27 } 28 </style>29 30 </head>31 32 <body>33 <p>一般來說,可以為所有區塊層級元素應用 text-indent,但無法將該屬性應用於行內元素,映像之類的替換元素上也無法應用 text-indent 屬性。不過,如果一個區塊層級元素(比如段落)的首行中有一個映像,它會隨該行的其餘文本移動。34 </p><!--段落-->35 36 <p>不過在為 text-indent 設定負值時要當心,如果對一個段落設定了負值,那麼首行的某些文本可能會超出瀏覽器視窗的左邊界。為了避免出現這種顯示問題,建議針對負縮排再設定一個外邊距或一些內邊距:</p><!--段落-->37 38 <font>1,2,3</font><!--文本-->39 40 <div>41 <ol>42 <li>上午12點下課</li>43 <li>下午5點半下課</li>44 <li>晚上9點半下課</li> 45 </ol>46 </div>47 <div>48 <ul>49 <li class="haha">上午12點下課</li><!--css類別選取器-->50 <li>下午5點半下課</li>51 <li>晚上9點半下課</li> 52 </ul>53 </div>54 55 </body>56 </html>
第五天,嘗試使用css