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>

 

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