实例说明:<!DOCTYPE html> <html> <body> <?php $date=date_create("2013-03-15"); date_add($date,date_interval_create_from...
实例说明:<?php for ($i=1; $i<=5; $i++) { echo "数字为 " . $i . PHP_EOL; } ?>标签含义:for 循环用于您预先知道脚本需要运行的次数的情况。上面的实例定义一个初始值为 i=1 的循环。...
实例说明:<html> <body> <?php $i=1; do { $i++; echo "The number is " . $i . "<br>"; } while ($i&l...
实例说明:<html> <body> <?php $i=1; while($i<=5) { echo "The number is " . $i . "<br>"; $i++; }...
实例说明:<?php $favcolor="red"; switch ($favcolor) { case "red": echo "你喜欢的颜色是红色!"; break; case "blue...
实例说明:<?php $t=date("H"); if ($t<"10") { echo "Have a good morning!"; } elseif ($t<"20"...
实例说明:<?php $t=date("H"); if ($t<"20") { echo "Have a good day!"; } else { echo "Have a...
实例说明:<?php $t=date("H"); if ($t<"20") { echo "Have a good day!"; } ?>标签含义:if 语句用于仅当指定条件成立时执行代码如...
每日笔记,文本小下划线。文本上横线,文本被花掉的线文字装饰text-decoration 属性用于设置或删除文本装饰。text-decoration: none; 通常用于从链接上删除下划线:实例a { text-decoration: none; }其他 text-decoration 值...
每日笔记,文字的首行缩进。文字字母距离文字缩进text-indent 属性用于指定文本第一行的缩进:实例p { text-indent: 25px; }我的文本14px的写一段话首行缩进2格就是25px了,我们来测试一下,这个css的属性看一是不是首行缩进2格字母间距letter-spaci...