接着,我们可以用CSS定义页面的样式。CSS文件命名为style.css:
以下为引用的内容:
body { font:0.8em/1.5 "Lucida Sans Unicode", "Lucida Grande", Arial, Helvetica; color:#333; background:#9AE4E8 url(‘bg.gif‘) no-repeat fixed left top; }
#title{ margin:20px 0px 10px 380px; }
#title img { border:0; width:150px; }
#title h2{ margin-top:10px; font-size:small; }
#footer { text-align:center; margin-top: 10px; padding-bottom: 4px; padding-top: 4px; }
#arrow { margin-top: 8px; padding-left: 420px; }
#container, #footer { background-color:white; padding-top: 10px; color: #000000; width:560px; margin-left: auto; margin-right: auto; }
#footer { margin-bottom:30px; }
#container { padding-bottom: 30px; width:560px; margin-left: auto; margin-right: auto; }
#container form { margin:10px 0px 10px 50px; }
legend { padding:0px 0px 0px 320px; } legend span { font-weight:bold; }
#footer_a { display:inline; word-spacing: 2px; font-size: 14px; padding-left: 10px; }
fieldset { border: none; } textarea { border: 1px dotted #449F00; width: 400px; height: 50px; padding: 5px; font-weight:bold; color:green; } |
当然,请不要忘了引用外部CSS文件。
<link media="screen" href="css/style.css" type="text/css" rel="stylesheet" />
第二步:用mysql创建数据库
mysql是一个非常强大的数据库系统,最重要的是,可以免费使用在我们的例子中,我们将使用mysql保存我们的消息数据。创建一个新表“message”,其字段如下所列:
id: key of this table, integer, auto-increment
message: the text of message, string
date: the message date, data format
该表设计如下:

创建该表的sql脚本如下:
CREATE TABLE `microblog`.`message` (
`id` int(10) unsigned NOT NULL auto_increment,
`message` text NOT NULL,
`date` datetime NOT NULL,
PRIMARY KEY (`id`)
);
.
分页: [
1] [
2] [
3] [
4] [
5]
TAG:
TWITTER JQUERY 站点