các bạn đổi chử trên bài thơ là được
- Code:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Thơ: Nhớ Mẹ Phương Xa</title>
</head>
<body>
<script src="http://code.jquery.com/jquery-git2.js"></script>
<style>
.typewrite{ FONT-SIZE: 10pt; COLOR: #ff0000; LINE-HEIGHT: 10pt; FONT-FAMILY: 'Verdana';}
.typing-cursor{ position: relative; display: inline-block; width: 10px; text-indent: -999em; background: #ccc;}
</style>
<script>
$(document).ready(function(){
//get the content
var content = $('.text').html();
//find the length of the content
var contentLength = content.length;
var char = 0;
$('.text').html('<span class="typing-cursor">|</span>');
//Here is the function
(function typeFunc() {
//dynamic delay to get the typewriting feel
var typingSpeed = Math.round(Math.random() * 120) + 0;
setTimeout(function() {
char++;
var type = content.substring(0, char);
$('.text').html(type + '<span class="typing-cursor">|</span>');
if (char == contentLength) char = 0;
//recursive
typeFunc();
}, typingSpeed);
}());
});
</script><div class="text">
<font color="#FF0000"> <p><b>Nhớ Mẹ Phương Xa</b> </p>
<pre>Cố không khóc nhưng lệ đẫm tròng
Nghe mẹ bệnh khiến lòng tê tái
Tha hương bao nỗi xót xa
Sáng ra nhớ mẹ, chiều tà nhớ cha
---------****---------
<b>Gởi tặng những người bạn đi làm xa quê nhà</b>
</pre> </font </div>
<p><i>Design by Lam</i></p>
</body>
</html>