PHP自學筆記40--圖形文字

我一看這個圖形文字,還以爲是那種很多小東西拼起來的圖形呢,其實不是,真的是一個圖形,10個數字和26個字母分別對應一個圖形。很好玩吧。文字爲Webdings,其實除了這個還有其他類型,比如Wingdings,Wingdings 2,Wingdings 3。

這裏用Webdings來做例子。代碼如下。

 

<html>
<head>
<?php header("content-type:text/html;charset=utf-8");?>
<style type="text/css">
.picfont{
font-size:100px;
color:#c99c96;
font-family:Webdings;  //set font to Webdings
}
</style>
</head>
<body>
<b>ouput word pic</b><br><br>
<form action="test040.php" method="post">
<b>input 26 alpahbet</b><br><br>
<input type="text" value="" name="str">
<p>input z or end with z</p>
<input type="submit" value="output">
<input type="reset" value="reset">
</form>
<?php
if(!empty($_POST['str'])){
$str=$_POST['str'];
echo"<font class='picfont'>".$str."</font>";
}
?>
</body>
</html>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章