html特效代码 枫叶,经典FLASH特效代码
时间: 2023-09-04 22:10:03 浏览: 207
HTML 特效代码 - 枫叶:
```
<!DOCTYPE html>
<html>
<head>
<title>Maple Leaf</title>
<style>
body {
background-color: #2c3e50;
margin: 0;
padding: 0;
}
.leaf {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100px;
height: 100px;
background-color: #e67e22;
border-radius: 50%;
box-shadow: 0 0 10px #e67e22;
animation: fall 5s linear infinite;
}
@keyframes fall {
0% {
top: -100px;
transform: translateX(-50%) rotate(0deg);
opacity: 1;
}
100% {
top: 100%;
transform: translateX(-50%) rotate(360deg);
opacity: 0;
}
}
</style>
</head>
<body>
<div class="leaf"></div>
</body>
</html>
```
经典 Flash 特效代码:
```
// 创建文本框
createTextField("myText", 0, 0, 0, 550, 400);
// 设置文本框属性
myText.border = true;
myText.wordWrap = true;
myText.multiline = true;
myText.embedFonts = true;
myText.autoSize = true;
// 设置字体格式
var myFormat:TextFormat = new TextFormat();
myFormat.font = "Arial";
myFormat.size = 36;
myFormat.color = 0xFF0000;
myFormat.bold = true;
// 应用字体格式到文本框
myText.setTextFormat(myFormat);
// 设置文本框的文本内容
myText.text = "Hello World!";
```
阅读全文